Results 1 to 11 of 11
  1. #1
    Full Member
    Join Date
    January 18th, 2005
    Posts
    233
    Is there a way i can convert pipe delimited file to tab delimited?

    Thanks

  2. #2
    Member
    Join Date
    January 18th, 2005
    Posts
    69
    I'm not a perl monk but try the following:

    perl -pi.bak -e "s/\|/\t/g" myfile

    Your backup will be myfile.bak ;-)

    Breezing

  3. #3
    Full Member
    Join Date
    January 18th, 2005
    Posts
    233
    Thanks, but where do i have to put this code for it to work. I dont know much about perl so it might be a really stupid question.

  4. #4
    Member
    Join Date
    January 18th, 2005
    Posts
    69
    Well I assumed you had access to a l(unix) machine... if you do you can just run that from the command line.

    I'm afraid I don't know about windows though.

    Breezing

  5. #5
    ABW Ambassador
    Join Date
    January 18th, 2005
    Posts
    1,356
    Open as a text file and do find and replace.

    Because there is no way to type a TAB into the "Find what" field, you need to type it into the document itself. Then ctrl-c cut it (the TAB), type a PIPE symbol in the "Find what" field, then ctrl-v paste the TAB character into the "Replace with" field.

    Hit "replace all" then go have a smoke or a drink or whatever tickles your fancy to pass the time if it's a big file.

  6. #6
    pph Expert! Gordon's Avatar
    Join Date
    January 18th, 2005
    Location
    Edmonton Canada
    Posts
    5,781
    This is a good tool for swapping the delimiters CSVed 1.0.0 last time I saw it it was free.
    One day parasites and their ilk will be made illegal, I bet a few Lawyers will be pissed off when the day comes.
    Mr. Spitzer is fetching it nearer

    YouTrek

  7. #7
    More Cheesier Than Ever Cheesehead's Avatar
    Join Date
    January 18th, 2005
    Location
    Land of The NFL Champs!
    Posts
    2,942
    What is the tool Gordon?
    This World is Not My Home
    We're gonna go inside, we're gonna go outside, inside and outside. . . And then we're gonna go go go and we're not gonna stop til we get across that goalline! Quotes from the movie Rudy, 1993

  8. #8
    pph Expert! Gordon's Avatar
    Join Date
    January 18th, 2005
    Location
    Edmonton Canada
    Posts
    5,781
    One thing is does is enables you to change delimiter very easily one or two clicks and you have a new delimiter. It also makes it easy to do find/replace and a few other things.

    I found this on the site download site Please make sure yourself there are no other programs bundled with it. I got a good clean download but I forgot where i got it from

    <BLOCKQUOTE class="ip-ubbcode-quote"><font size="-1">quote:</font><HR> CSVed allows you to manipulate any CSV file, separated with any separator. The contents of the CSV file is visible in a list view window that allows you to easily edit, add, insert, delete and move the items, as if they were in a database table. You can delete rows and add columns or rearrange the column order. In addition, you can remove duplicates and repair files or use the built in search features to find specific records. CSVed also offers search and replace, export to XML and more. If you are frequently working with CSV files, this is an extremely handy tool! <HR></BLOCKQUOTE>
    One day parasites and their ilk will be made illegal, I bet a few Lawyers will be pissed off when the day comes.
    Mr. Spitzer is fetching it nearer

    YouTrek

  9. #9
    I like traffic lights
    Join Date
    January 18th, 2005
    Location
    Southern hemisphere - away from Fukushima
    Posts
    2,936
    &gt;Because there is no way to type a TAB into
    &gt;the "Find what" field

    Actually, speaking from my old days of using Microsoft Word, you might find that typing ^t into the find/replace edit box will work for MS products.

    And ^p for a paragraph (end of line) mark

    Can't remember the rest.

  10. #10
    Full Member
    Join Date
    January 18th, 2005
    Posts
    233
    Thanks, gotit to work, but now i have another problem.
    I have 2 separate datafeeds, one containig IDs and images and the other containing Ids and descriptions. I need to merge those files, so that the right desc, IDs and images fall together.

    Another solution might be to upload the first datafeed to Mysql database and then upload the description feed (but the right desc, ID and image have to fall together). Is it possible to do it like that??

    Thanks

  11. #11
    More Cheesier Than Ever Cheesehead's Avatar
    Join Date
    January 18th, 2005
    Location
    Land of The NFL Champs!
    Posts
    2,942
    Thanks for the link Gordon.
    This World is Not My Home
    We're gonna go inside, we're gonna go outside, inside and outside. . . And then we're gonna go go go and we're not gonna stop til we get across that goalline! Quotes from the movie Rudy, 1993

  12. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Pipe Delimited to Comma Separated
    By knight01 in forum Programming / Datafeeds / Tools
    Replies: 12
    Last Post: March 30th, 2014, 01:57 AM
  2. Pipe delimited Datafeed To MySQL
    By nick_mayhem in forum Programming / Datafeeds / Tools
    Replies: 7
    Last Post: September 18th, 2006, 09:56 AM
  3. javascript for PIPE DELIMITED (|) database
    By davon in forum ShareASale - SAS
    Replies: 0
    Last Post: December 29th, 2005, 06:33 PM
  4. Changing Pipe delimited to CSV or tab
    By westgroup in forum Programming / Datafeeds / Tools
    Replies: 13
    Last Post: June 9th, 2005, 02:10 AM
  5. tab or pipe delimited format in a .csv
    By hershey in forum Programming / Datafeeds / Tools
    Replies: 2
    Last Post: July 17th, 2002, 08:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •