featherking
November 6th, 2006, 02:38 AM
I have a file where the records were input with 3 spaces inbetween each record instead of a comma or a carraige return between each. Is there a script i can run to remove the spaces and replace them with either a comma or a colon or a carraige return would be the best.
the only thing ive come up with so far is to somehow use awk
awk '{print $1}' /home/chris/Desktop/list | sort
this prints only the first record, thinking that with the spaces the file actually only contains one record. Is there someway i can have it delete the spaces after the characters? then maybe i could take that output and just > into a new file?
the only thing ive come up with so far is to somehow use awk
awk '{print $1}' /home/chris/Desktop/list | sort
this prints only the first record, thinking that with the spaces the file actually only contains one record. Is there someway i can have it delete the spaces after the characters? then maybe i could take that output and just > into a new file?