[comp.unix.internals] using #! and a different shell

rickert@mp.cs.niu.edu (Neil Rickert) (02/22/91)

In article <17438:Feb2121:00:5691@kramden.acf.nyu.edu> brnstnd@kramden.acf.nyu.edu (Dan Bernstein) writes:

>1. Your subject line is nearly useless. ``Using #!'' is too general, and
>``a different shell'' is irrelevant. Much better would be

 Break it up.  Break it up.

 The question may have been poorly phrased, and should have been in
comp.unix.questions.  But it is quite understandable nevertheless.  Your
intemperate answer was uncalled for.  Besides you could have given the answer
with less than 10% of the effort you put into your reply -- even if it were no
more than the man pages reference you hid amidst you verbiage.

-- 
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
  Neil W. Rickert, Computer Science               <rickert@cs.niu.edu>
  Northern Illinois Univ.
  DeKalb, IL 60115                                   +1-815-753-6940

barnett@grymoire.crd.ge.com (Bruce Barnett) (02/28/91)

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