The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 05-26-2009
JerryHone JerryHone is offline
Registered User
  
 

Join Date: Nov 2006
Location: UK
Posts: 178
"Cascading backslashes" a.k.a "Leaning toothpicks"!


Code:
var=`echo "Hello\,World" | sed 's/\\\,/,/'`; echo $var --> "Hello,World"

seems to work!

It's because the backticks are spawning another subshell, but the original backslashes have already been interpreted by the first one.