csh and echo

Andre Goree andre at drenet.net
Thu May 29 16:50:17 UTC 2014


> 
> Try with single quotes:
> 
> # echo '$1$rVxldcGZ$CisrIAX4SBYUkMJt9KjXl0'
> $1$rVxldcGZ$CisrIAX4SBYUkMJt9KjXl0
> 
> 
> ( Sorry for the damaged 2nd mail, in case it got through )
> 
> Michael

Thanks!

> 
> The csh does exactly what it should to. Use '...' instead of "..."
> to avoid evaluations within a string, for example:
> 
> 	% echo '$1$rVxldcGZ$CisrIAX4SBYUkMJt9KjXl0'
> 	$1$rVxldcGZ$CisrIAX4SBYUkMJt9KjXl0
> 
> It's not an issue, it's intended. Strings enclosed in "..." are
> allowed to contain variables, whereas strings enclosed in '...'
> are being processed without expansion.
> 
> 	$ echo '$1$rVxldcGZ$CisrIAX4SBYUkMJt9KjXl0'
> 	$1$rVxldcGZ$CisrIAX4SBYUkMJt9KjXl0
> 
> I'm sure this is mentioned somewhere in "man bash", as well as
> in "man csh" regarding the C Shell. :-)

You're absolutely correct, complete derp moment on my part.  I knew it 
would be something so easy, my brain's been fried lately, lol.  Thanks!

-- 
Andre Goree
-=-=-=-=-=-
Email     - andre at drenet.net
Website   - http://www.drenet.net
PGP key   - http://www.drenet.net/pubkey.txt
-=-=-=-=-=-


More information about the freebsd-questions mailing list