How do I pass variables as parameters to commands in a c shell?
Something like this:
vncserver -depth $BITDEPTH -geometry $WIDTHx$HEIGHT
I appreciate your help!
Thank you!
How do I pass variables as parameters to commands in a c shell?
Something like this:
vncserver -depth $BITDEPTH -geometry $WIDTHx$HEIGHT
I appreciate your help!
Thank you!
The bit that might be causing confusion is the geometry: you're passing the concatenation of variable ${WIDTHx}
and ${HEIGHT}
(which was not what you had in mind).
Try:
vncserver -depth ${BITDEPTH} -geometry ${WIDTH}x${HEIGHT}
The only mandatory braces are those around ${WIDTH}
(though the local coding standards here say 'all variable expansions shall use braces around the name', but they also say 'thou shalt not use C shell for scripting'); the others are for uniformity.