Nov 10, 2003 #1 ianicr IS-IT--Management Nov 4, 2003 230 GB I have a csv file with names and addresses eg. Mr,Smith,1,New Street,Birmingham Is there an easy way of removing the third comma to make the file Mr,Smith,1 New Street, Birmingham Thanks
I have a csv file with names and addresses eg. Mr,Smith,1,New Street,Birmingham Is there an easy way of removing the third comma to make the file Mr,Smith,1 New Street, Birmingham Thanks
Nov 10, 2003 1 #2 Annihilannic MIS Jun 22, 2000 6,317 AU sed 's/,/ /3' filename > output should do it (a trick I learned from SamBones). Annihilannic. Upvote 0 Downvote
Nov 10, 2003 Thread starter #3 ianicr IS-IT--Management Nov 4, 2003 230 GB You're a star. Thanks a lot Upvote 0 Downvote
Nov 10, 2003 Thread starter #4 ianicr IS-IT--Management Nov 4, 2003 230 GB One last thing, how do you do it with a tab delimited file? Upvote 0 Downvote
Nov 10, 2003 #5 dickiebird Programmer Feb 14, 2002 758 GB sed 's/,/ /' infile > outfile will replace the first , found with a space, irrespective of the delimiter Dickie Bird (-))) Upvote 0 Downvote
sed 's/,/ /' infile > outfile will replace the first , found with a space, irrespective of the delimiter Dickie Bird (-)))
Nov 12, 2003 #6 PHV MIS Nov 8, 2002 53,708 FR With a Tab delimited file: Code: sed 's/ / /3' filename > output ^^^ Single Tab char Hope This Help PH. Upvote 0 Downvote
With a Tab delimited file: Code: sed 's/ / /3' filename > output ^^^ Single Tab char Hope This Help PH.