Adrian,
Couple of ways:
(hack)thebeast@ricklman# cat spaces.txt
a b c d
e f g h
i j k l
(hack)thebeast@ricklman# sed -e "s/ /,/g" < spaces.txt > commas.txt
(hack)thebeast@ricklman# cat commas.txt
a,b,c,d
e,f,g,h
i,j,k,l
Different syntax:
cat spaces.txt | sed -e "s/ /,/g" > commas.txt
Different tool than sed:
cat spaces.txt | tr ' ' ','
cat spaces.txt | awk '{gsub(" ",",",$0); print $0}'
Have fun,
--
Rick L. Mantooth
[EMAIL PROTECTED]
Very funny Scotty. now beam down my clothes.
On Wed, 29 Dec 1999, Adrian Walters wrote:
=> i know this has been asked a billion times, but howwould you take a space
=> delimited file and put comas where the spaces are. a shell cript is
=> preferred over a perl script
=> ______________________________________________________
=> Get Your Private, Free Email at http://www.hotmail.com
=>
=>
=> --
=> To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
=> as the Subject.
=>
=>
--
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.