Results 1 to 3 of 3
I am shell scripting in C-shell and I get the message:
Bad : modifier in $ (/)
The only slashes (/) I have in the script is at the start ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-07-2013 #1Just Joined!
- Join Date
- Feb 2013
- Posts
- 1
Bad : modifier in $ (/)
I am shell scripting in C-shell and I get the message:
Bad : modifier in $ (/)
The only slashes (/) I have in the script is at the start of the script, i.e: #!/bin/csh
How can I make it work??
- 02-08-2013 #2Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,664
Hello and welcome!
I have moved your post to the Programming/Scripting forum, where it will hopefully get better attention.
- 02-08-2013 #3Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,664
It is possible that you have a variable butting up against another character, maybe a colon? it is hard to say without seeing your code. but this will yield a similar error:
when i run the above i get:Code:#!/bin/csh setenv dir '/tmp' echo $dir:a
but if i enclose the variable in curly braces, e.g.:Code:Bad : modifier in $ ( ).
then all is well:Code:echo ${dir}:a
if this does not help, can you post your whole script?Code:/tmp:a


Reply With Quote

