I have just wasted way too much time at work trying to solve this question. I came across the problem while working on parsing script arguments. In a highly simplified form here is an example of the problem:
#!/bin/csh -f
set arg="-a"
if ( $arg =~ -*a* ) then # this works ok
echo "### -a =~ -a"
else
echo "### -a !~ -a"
endif
set arg="-f"
if ( $arg =~ -*f* ) then # looks the same, but doesn't work
echo "### -f =~ -f"
else
echo "### -f !~ -f"
endif
-f isn't the only value for arg that will cause an error, does anyone have any idea why the letter I use is causing me problems?
The "-" seems to be part of the problem, but I tried quoting the string and escaping the "-" and those didn't help.
Ideas anyone?
TIA
[ 06-21-2001: Message edited by: Mactoid ]