The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



Thread: replace chars,
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 02-27-2007
dennis.jacob dennis.jacob is offline
dj -------
 

Join Date: Feb 2007
Location: Cochin/Bangalore, India
Posts: 447
If x="21312312dennis3123123123"
echo ${x/dennis/xxxxxx}
x will be 21312312xxxxxx3123123123 now

echo $x |sed 's/dennis/xxxxxx/' will also give the same result.

I hope this is what you are expecting!!
Reply With Quote