dumb question

Ed Greshko Ed.Greshko at greshko.com
Wed Jan 4 08:06:13 UTC 2012


On 01/04/2012 03:59 PM, Paul Allen Newell wrote:
> Though I really appreciate both of your replies, I am looking at them
> and seeing that Marvin is saying it needs to be "+x" and Ed is saying
> it doesn't. I ran a test and "-x" seems to work.

FYI, Marvin corrected himself saying....

Sorry..

My bad...

The make is +x..

>
> For questions on my syntax of "*.sh", I have believed since my
> earliest days that a shell file (be it ".sh", ".csh", ".tcsh", or
> ".bash") that it has to be "+x" as it is an executable. If I am
> incorrect, I would love to know, though it may take me a day or two to
> adjust to the news that the earth shifted polarity (smile)

If you want them to be directly executable, yes.  But if you call them
as input to a shell they need not be.

If you have them as executable you can control what shell is used by the
first line in the file.

As I mentioned earlier, I've got a shell script called killfox.  The
first line contains "#!/bin/bash" which means it is a "bash" script.  I
could change it to ""#!/bin/tcsh" and it would be interpreted as a tcsh
script.





-- 
A common mistake that people make when trying to design something
completely foolproof was to underestimate the ingenuity of complete
fools. -- Douglas Adams in "Mostly Harmless


More information about the users mailing list