Oct 28, 2003 #1 dodge20 MIS Jan 15, 2003 1,048 US Hello, I have a file that is tab delimited. I was wondering how can I change the tab to |. Dodge20
Oct 28, 2003 1 #2 bi Technical User Apr 13, 2001 1,552 US To do it with vi type this: :%s/ /|/g The character you can't see between the first / and the second / is a tab. To do it with sed: sed 's/ /|/g' test.txt > test2.txt Upvote 0 Downvote
To do it with vi type this: :%s/ /|/g The character you can't see between the first / and the second / is a tab. To do it with sed: sed 's/ /|/g' test.txt > test2.txt
Oct 28, 2003 Thread starter #3 dodge20 MIS Jan 15, 2003 1,048 US How do I get rid of the END that is at the end of each line? Dodge20 Upvote 0 Downvote
Oct 28, 2003 Thread starter #4 dodge20 MIS Jan 15, 2003 1,048 US nevermind that was actually in the file. My real question is how do I get rid of quotation marks that surround a name? Dodge20 Upvote 0 Downvote
nevermind that was actually in the file. My real question is how do I get rid of quotation marks that surround a name? Dodge20
Oct 28, 2003 #5 bi Technical User Apr 13, 2001 1,552 US What do you see at the end of each line? Upvote 0 Downvote
Oct 28, 2003 Thread starter #6 dodge20 MIS Jan 15, 2003 1,048 US I got it. Thanks Dodge20 Upvote 0 Downvote
Oct 28, 2003 #7 bi Technical User Apr 13, 2001 1,552 US If you want to get rid of all quotation marks and replace the marks with nothing, use this with vi: :%s/"//g and with sed: sed 's/"/|/g' test.txt > test2.txt What these things are doing is: search (the s)/what-you-are-searching-for/what-you-are-replacing/global (the g) the :% for vi is getting you to the command mode (or whatever it's called) to execute it. Thanks for the star. Upvote 0 Downvote
If you want to get rid of all quotation marks and replace the marks with nothing, use this with vi: :%s/"//g and with sed: sed 's/"/|/g' test.txt > test2.txt What these things are doing is: search (the s)/what-you-are-searching-for/what-you-are-replacing/global (the g) the :% for vi is getting you to the command mode (or whatever it's called) to execute it. Thanks for the star.