Quotes in Unix Shell and JSTL
Double quote and single quote is different.
Double quote: Everything between quotes is take literally, except for the following characters that keep there special meaning:- $ variable substitution will occure
- ` command subtitution will occure
- \ escape next character
- ! history character
- newline
- ! history
- newline.
For my scripts, it is much safer to use double quote.
One of my script is like this:
/usr/bin/egrep '$2' $1
if [ $? -eq 0 ] ; then
the single quote surounding $2 caused confusion.
Not so sure about their difference in JSTL. In the “Core JSTL” book, single quote is used.
Add a comment
You are not allowed to comment on this entry as it has restricted commenting permissions.