[vox-tech] script error when migrated from Solaris to Linux
Tony Cratz
cratz at hematite.com
Wed Dec 23 17:42:59 PST 2009
Hai Yi wrote:
> I thought so too. But it's what's the first line in the script. It's
> running on Sun OS 4.
>
>
>> Hai Yi wrote:
>>
>>> #ident "%W%"
>>>
>>
>> Should that really be?
>>
>> #!/bin/sh
>> ident "%W%"
I just did a refresh of my some of my early programming days.
The "%W%" is an SCCS keyword. For more info on it look at:
http://www.gmtel.net/web/drittmer/Technical/SCCS_Keywords.pdf
SCCS is an OLD version control system.
But with that said. To make sure your script works in a Linux
environment make the first line:
#!/bin/sh
The SCCS info should NEVER have been on the first line. While a
line which starts with '#' is a comment it was NEVER a good way
to make the scripts where it would work on multi-systems. The
old way we use to do this was have the first line on a true
Borune Shell system as:
:
# above line is a comment
Latter the standard turned into being the normal '#!/bin/sh'
Tony
More information about the vox-tech
mailing list