From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.109.59.89.173.mobile.3.dk!not-for-mail From: Jacob Sparre Andersen Newsgroups: comp.lang.ada Subject: Re: Trying to execute a command from inside of Ada Date: Mon, 04 Jun 2018 08:44:10 +0200 Organization: JSA Research & Innovation Message-ID: <87a7sboxtx.fsf@jacob-sparre.dk> References: <08857a7e-59ae-423e-a683-388df808133d@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: franka.jacob-sparre.dk; posting-host="109.59.89.173.mobile.3.dk:109.59.89.173"; logging-data="31755"; mail-complaints-to="news@jacob-sparre.dk" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) Cancel-Lock: sha1:avH66ocvN4JYgHZCtczEkW1gm4E= Xref: reader02.eternal-september.org comp.lang.ada:52909 Date: 2018-06-04T08:44:10+02:00 List-Id: John Smith wrote: > procedure Sys_Command is > Result : Integer; > Arguments : Argument_List := > ( 1=> new String'("bash"), > 2=> new String'("ls -l ~") > ); Have you tried to run this on your command line? bash "ls -l ~" That's basically what you ask your program to do. I would: 1) Avoid involving Bash in this. 2) Remember to pass each argument separately. And I might additionally: 3) Expand "~" myself, as "ls" doesn't know how to do that (but "system()" or "/bin/sh" might). Greetings, Jacob -- "Universities are not part of the nation's security organisation, they are not the nation's research laboratory either: they are the nation's universities." -- E.W. Dijkstra