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

    Join Date
    May 2012
    Posts
    63
    Rep Power
    3

    Request to check


    Hi all


    I have a big file which I am not able to attach here

    And, I have to fetch certain entries and arrange in 5 columns


    Code:
    Name Drug DAP ID disease approved or not

    In the attached file data is arranged with tab separated columns in this way:
    Quote:
    TTDS00001 Name

    Drug(s) DAPID Disease name Approved /(blank)


    and other data is also present which I dont want to fetch

    I want the output should be like this


    Quote:
    Name Drug DAP ID disease Approved or not

    Muscarinic Bethanechol DAP000263 Urinary retention Approved
    acetylcholine
    receptor
  2. #2
  3. Contributing User
    Devshed Novice (500 - 999 posts)

    Join Date
    Sep 2006
    Posts
    857
    Rep Power
    388

    Thumbs down


    Originally Posted by manigrover
    Hi all

    ... Etc ...

    I want the output should be like this

    Quote:
    Name Drug DAP ID disease Approved or not

    Muscarinic Bethanechol DAP000263 Urinary retention Approved
    acetylcholine
    receptor
    Fine, just do it however you want it to look.
  4. #3
  5. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,894
    Rep Power
    481
    Again, learn gawk. The program is almost assuredly trite in gawk.
    [code]Code tags[/code] are essential for python code and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo