Path: utzoo!mnetor!uunet!husc6!cmcl2!phri!bc-cis!raanan From: raanan@bc-cis.UUCP (Raanan Herrmann) Newsgroups: comp.unix.xenix Subject: shell problem Message-ID: <1171@bc-cis.UUCP> Date: 19 Mar 88 15:37:25 GMT Reply-To: raanan@bc-cis.UUCP (Raanan Herrmann) Organization: Brooklyn College of CUNY, Brooklyn, NY Lines: 20 An application I wrote in shell should accept a unix command from a user and execute it. The solustion should be: read l exec $l This does not work when $l contain a commands with parameters (eg. "ls -l") as the error generated is "command not found", and does not work when the command contain ";" (eg. "ls -l;who"). My solution was; read l echo $l>tmp$$ exec tmp$$ But, I don't like this solution - any better ideas. PLEASE, also e-mail your answer to me, to ron@jkfmny.uucp -- ------------------------------------------------------------------------ Ron Herrmann (jkfmny!ron, ron@jkfmny.UUCP raanan@bklyncis.BITNET)