[TriLUG] bash cmd line processing question
14 Feb 2002 14:07:22 -0500
On Thu, 2002-02-14 at 13:36, Paul D. Boyle wrote:
> The (') is one of the ways to quote strings in shells, and I have
> never really understood the difference between " and '.
Anything that is enclosed in "s is still elligble for shell
substitution. If you pass "$SHELL" to a command, it get /bin/bash (or
whatever your shell is).
Anything that is enclosed in 's is taken as a literal. So, if you pass
'$SHELL' to a command, it gets $SHELL.
To see, at your favorite prompt;
> echo '$SHELL'
> echo "$SHELL"
> Paul D. Boyle | email@example.com
> Director, X-ray Structural Facility | phone: (919) 515-7362
> Department of Chemistry - Box 8204 | FAX: (919) 515-5079
> North Carolina State University |
> Raleigh, NC, 27695-8204
> TriLUG mailing list
Porivo Technologies, Inc.
919.806.0566 | mailto:firstname.lastname@example.org
Measuring end-to-end Web performance.