Subject: Re: /etc/rc with #!/bin/sh ?
To: David Maxwell <email@example.com>
From: Gandhi woulda smacked you <firstname.lastname@example.org>
Date: 06/23/1999 10:01:56
On Wed, 23 Jun 1999, David Maxwell wrote:
# Sorry, I'm confused. I think you're saying that init calls rc using sh
# no matter what's at the top, and asking if we should teach it to use
No, I'm saying "init calls rc using sh no matter what the top line".
My wondering about magic is something entirely different.
# > Does our file(1) need a better algorithm, or would that be nuts given that
# > there are quite a few shell scripts with enough filler in comments
# > to force it to rely on the #! line? (probably this is the case).
# It might be interesting to allow file to read a second line, if the
# first line is #!/bin/sh, and if the second line is a comment, use that
# as part of the description...
Not without an option, methinks. I think it'd break compatibility with other
versions of file (...is this even worth thinking about? I don't know.).
# That would give
# 1) The ability to file /etc/* | grep Bourne | something
I think that #!.+/bin/sh should magic to Bourne shell commands,
that #!.+/csh should magic to C shell commands, that #!.+/perl should
magic to Perl script (or something...). That doesn't sound terribly
# 2) The ability to execute /etc/rc (provided you chmod +x)
You can execute rc: sh /etc/rc. I know this is not what you had in mind,
but it's certainly exactly what happens. If it's not good enough, alias it.
# 3) The longer description for the sake of being prettier.
Hey, we're all competent folks here. Pretty is nice, but should be an
option over functionality.
# David Maxwell, email@example.comfirstname.lastname@example.org -->
# (About an Amiga rendering landscapes) It's not thinking, it's being artistic!