Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2003
    Posts
    10

    Unanswered: Copying a specific number of records from one file to another

    I have a huge file containing about 3 million records. I don't want to test using this huge file. I want to pull off the first 100 records from this file. Is there a command I can use to do this or will I have to write a script to do it?

    I can use the SPLIT command and eventually get it down to 1000 records, but it takes a while.

    Cobilan

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: Copying a specific number of records from one file to another

    head command .....

    man head

    should give you more details ..

    eg. head -100 bigfile > myfile

    Cheers

    Sathyaram


    Originally posted by cobilan
    I have a huge file containing about 3 million records. I don't want to test using this huge file. I want to pull off the first 100 records from this file. Is there a command I can use to do this or will I have to write a script to do it?

    I can use the SPLIT command and eventually get it down to 1000 records, but it takes a while.

    Cobilan

  3. #3
    Join Date
    Feb 2003
    Posts
    10
    Thank you soooooooooo much!!! You've saved me a lot of time!

    Cheers!!!

    Cobilan

Posting Permissions

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