Howdy.
I'm trying to run a bourne shell script that runs fine on other
machines, but when run on HP gives the message "A specified
flag is not valid for this command." The flag on the shebang
line giving the grief is "--".
The general bourne-shell help file for that option (off the web) reads:
-- Does not change any of the flags. This is useful in setting the $1
positional parameter to a string beginning with a - (dash).
Why is this not a valid flag on HP-UX? Or am I missing something?
Further details given below; *any* help much appreciated.
Carl
System info for the machine I'm running on: HP-UX B.11.00 U 9000/800
After experimenting a bit, the following file exhibits the problem:
#!/bin/sh -- -f
echo "OK..."
So does:
#!/bin/sh -- # A comment
echo "OK..."
But this seems to run fine:
#!/bin/sh --
echo "OK..."
I'm trying to run a bourne shell script that runs fine on other
machines, but when run on HP gives the message "A specified
flag is not valid for this command." The flag on the shebang
line giving the grief is "--".
The general bourne-shell help file for that option (off the web) reads:
-- Does not change any of the flags. This is useful in setting the $1
positional parameter to a string beginning with a - (dash).
Why is this not a valid flag on HP-UX? Or am I missing something?
Further details given below; *any* help much appreciated.
Carl
System info for the machine I'm running on: HP-UX B.11.00 U 9000/800
After experimenting a bit, the following file exhibits the problem:
#!/bin/sh -- -f
echo "OK..."
So does:
#!/bin/sh -- # A comment
echo "OK..."
But this seems to run fine:
#!/bin/sh --
echo "OK..."