Some random thoughts and links

Posts Tagged ‘a-team’

High performance … delivered …

This is a true story, it all started like this:

From:     me
Sent:    today
To:    someone@accenture.com
Subject:    Scripts

Hi xxx, yyy,

You probably know, but I just looked at some of your scripts and saw:

user@server scripts $ more curdate.sh
#################################################################################
#!/usr/bin/sh                                                                   #
#                                                                               #

It wont work like this, because it needs to be in the first line with no spaces in front like this:

user@server scripts $ more curdate.sh
#!/usr/bin/sh
#################################################################################
#!/usr/bin/sh                                                                   #
#                                                                               #

Regards,

zzz

this was the response:

From:    someone@accenture.com
Sent:    today
To:    me
Subject:    RE: Scripts

Hi zzz,

We use this in all our scripts this way and it works fine. Why do you think, that it is not working?

Thanks,
yyy

after providing a link to Wikipedia explaining how Unix scripts work (http://en.wikipedia.org/wiki/Shebang_(Unix) ), this was the response:

From:     someone@accenture.com
Sent:    today
To:    me
Subject:    RE: Scripts

Hi zzz,
I can see the sentence where it says refers to the characters “#!” when they are the first two characters in a text file. I do not want to discuss whether the wikipedia article is misleading or just wrong. However, our scripts are working in the way they are programmed (even if not started with an explicit shell).

I have seen a comment block which includes the shebang already a couple of times and think, that it is common practice to do so. Therefore I do not see any need for a change.

Regards,
yyy

VN:F [1.8.4_1055]
Rating: 0.0/10 (0 votes cast)
VN:F [1.8.4_1055]
Rating: 0 (from 0 votes)