#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2013
    Posts
    23
    Rep Power
    0

    How to ignore Pipe in Pipe delimited file?


    Hi guys,

    I need to know how i can ignore Pipe '|' if Pipe is coming as a column in Pipe delimited file

    for eg:


    file 1:
    xx|yy|"xyz|zzz"|zzz|12...
    using below awk command

    awk 'BEGIN {FS=OFS="|" } print $3

    i would get xyz

    But i want as :

    xyz|zzz to consider as whole column representing as 3rd coulmn in that file
  2. #2
  3. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,122
    Rep Power
    9398
  4. #3
  5. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Sep 2006
    Posts
    857
    Rep Power
    388

    Cool


    Originally Posted by vasanth_amrita
    Hi guys,

    I need to know how i can ignore Pipe '|' if Pipe is coming as a column in Pipe delimited file

    for eg:


    file 1:
    xx|yy|"xyz|zzz"|zzz|12...
    using below awk command

    awk 'BEGIN {FS=OFS="|" } print $3

    i would get xyz

    But i want as :

    xyz|zzz to consider as whole column representing as 3rd coulmn in that file
    Have the source generate the file with another delimiter.

IMN logo majestic logo threadwatch logo seochat tools logo