Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!rpi!crdgw1!barnett From: barnett@grymoire.crd.ge.com (Bruce Barnett) Newsgroups: comp.unix.internals Subject: Re: using #! and a different shell Message-ID: Date: 27 Feb 91 17:36:34 GMT References: <1991Feb21.172233.8160@aplcen.apl.jhu.edu> <1991Feb22.013533.24299@athena.mit.edu> Sender: news@crdgw1.crd.ge.com Reply-To: barnett@crdgw1.ge.com Organization: GE Corp. R & D, Schenectady, NY Lines: 18 In-reply-to: jik@athena.mit.edu's message of 22 Feb 91 01:35:33 GMT In article <1991Feb22.013533.24299@athena.mit.edu> jik@athena.mit.edu (Jonathan I. Kamens) writes: > printf(" %s", *argv++); This version is more interesting: printf("<%s>", *argv++); There are some gotchas using a shell script, e.g. Examples that don't work as expected: #!/bin/echo-args -f #!/bin/echo-args a b c d e #!/very/long/path/to/the/locations/of/the/binary/program/echo-args The first one has a space after the -f. '#!/bin/awk -f ' doesn't work. The second one passes "a b c d e" as the first argument The third one has a path too long for some versions of Unix. -- Bruce G. Barnett barnett@crd.ge.com uunet!crdgw1!barnett