c shell environment variable error: "Bad : modifier in $"

Posted by Marshall Ward on Super User See other posts from Super User or by Marshall Ward
Published on 2011-01-17T23:04:13Z Indexed on 2011/01/17 23:55 UTC
Read the original article Hit count: 176

Filed under:
|

Hi, I am using tcsh and define an environmental variable as follows:

setenv mycomp [email protected]

so that when I need to copy files from the remote my.computer.com, I type the following:

scp $mycomp:sourcepath destpath

But when I do this, I get the following error: "Bad : modifier in $ (m)." where (m) is the first character after the colon.

What is this error telling me, and how can I fix it?

© Super User or respective owner

Related posts about environment-variables

Related posts about tcsh