using #! and a different shell

Bruce Barnett barnett at grymoire.crd.ge.com
Thu Feb 28 04:36:34 AEST 1991


In article <1991Feb22.013533.24299 at athena.mit.edu> jik at 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 at crd.ge.com	uunet!crdgw1!barnett



More information about the Comp.unix.internals mailing list