I have done something like this
set phases = "a b"
set phases = "phases="$phases
echo $phases
I get
phases=a
instead of
phases=a b
I have done something like this
set phases = "a b"
set phases = "phases="$phases
echo $phases
I get
phases=a
instead of
phases=a b
move your quotes.
set phases = "phases=$phases"
not sure what your trying to do by if you just need to echo the value do it this way
echo "phases=$phases"
Hopefully, this question is answered as well on your other post.
As a rule of thumb think of the single quote (') as a string were all the characters loose their extra special meaning, therefore, symbols like $,",*, etc, are interpreted by their face value at the shell.
I need to create the variable containing the string so that I can use it to run a program from within the csh script.
/nethome/chrisd/HSeis/TommyCD/TommyCD-1101/bin/raytrac \
vmod=npt02-z30.vmod \
srfile=jcdint.sc \
rcfile=jcdint.rc \
phases="SP FS" \
level=twop \
format="X T" \
dtau=0.1 \
mdacc=0.5 \
mindist=0.2 \
maxitertp=25 \
ray=npt02-z30.ry \
out=npt02-z30.tx \
vrb=medium |& tee npt02-z30.log