echo "'$SHELL'" -> outputs 'bash' echo '"$SHELL"' -> outputs "$SHELL" #### echo "a ' quote"' and a " quote' outputs: a ' quote and a " quote #### cat file.txt | perl -ne '{chomp; ($a, $b) = split/\s+/; $s = "$a $b"; next if($s !~ /^\w+\'"'"'?\w+?\s+\w+\'"'"'?\w+?$/); print "$_\n"}' | wc -l
## echo "a ' quote"' and a " quote' outputs: a ' quote and a " quote ##
## cat file.txt | perl -ne '{chomp; ($a, $b) = split/\s+/; $s = "$a $b"; next if($s !~ /^\w+\'"'"'?\w+?\s+\w+\'"'"'?\w+?$/); print "$_\n"}' | wc -l