Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2004
    Posts
    11

    Unanswered: To Remove The Header FIle

    state Desc
    ----- ----
    TX Texas
    MI Michigan

    Hi,
    I will be getting a file like this with the columns being of fixed width format,i need to load them into Teradata Tables removing the headers.

    Any suggestions will be appreciated.

    Thanks
    vootkur

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Talking

    You could use sed:

    sed -n '3,$p' oldfile >newfile

    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  3. #3
    Join Date
    Jun 2004
    Posts
    11
    hi lkbrwn,

    when i was trying to run ur command its saying
    sed:3 illegal option

  4. #4
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Exclamation

    Quote Originally Posted by vootkur
    when i was trying to run ur command its saying
    sed:3 illegal option
    You must be typing something wrong, it works:

    $ cat oldfile
    state Desc
    ----- ----
    TX Texas
    MI Michigan
    FL Florida
    WA Washington
    MN Minesota
    $ sed -n '3,$p' oldfile >newfile
    $ cat newfile
    TX Texas
    MI Michigan
    FL Florida
    WA Washington
    MN Minesota
    $
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

Posting Permissions

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