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 UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 03-01-2006
zazzybob's Avatar
zazzybob zazzybob is offline
Registered Geek
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
Well, according to that, you want to replace the space with a comma?

echo "$STR" | tr ' ' ','
echo "$STR" | sed 's/ /,/g' # g isn't strictly needed here

Cheers
ZB
Reply With Quote