How to split/copy/move a large file by exactly line number?

Hi everyone,
I already know the exactly line numbers of a large file. For example,
I want to split or copy or move Infile from 1~66666 to outfile1;
split or copy or move Infile from 66667~166666 to outfile2;
split or copy or move Infile from 166667~266666 to outfile3....
After check and try some commands, still not solving... Can any person help me?
Thanks

head -n 66666 Infile > outfile1
sed "1,66666d" Infile |head -n `expr 166666 - 66667` > outfile2
sed "1,166667d" Infile |head -n `expr 266666 - 166667` > outfile3

Similar Messages

  • How do I copy my old xl files from my XP machine to operate on xl for Mac on my new iMac.  When I copy them onto a stick and transfer them it automatically makes them xls files which are then corrupted when I try to open them in xl for mac

    How do I copy my old xl files from my XP machine to operate on xl for Mac on my new iMac.  When I copy them onto a stick and transfer them it automatically makes them xls files which are then corrupted when I try to open them in xl for mac

    Sorry, yes this is Microsoft Excel.  The Microsoft XP has Excel files denoted as xl, the later versions of Microsoft Excel are denoted as xls files.  The later verions of Microsoft Excel open the xl files OK, does Excel for Mac not able to do this?

  • How can I copy programs (iWorks) and files from Time Capsule to my HD manually? The problem is that the migration assistant does not recognize my backup file and the user on the TC. (If I open the TC on finder, it it there though)

    How can I copy programs (iWorks) and files from Time Capsule to my HD manually? The problem is that the migration assistant does not recognize my backup file and the user on the TC. (If I open the TC on finder, it it there though)

    How can I copy programs (iWorks) and files from Time Capsule to my HD manually? The problem is that the migration assistant does not recognize my backup file and the user on the TC. (If I open the TC on finder, it it there though)

  • HT2476 How do I copy the names of files in a finder window to a text document?

    How do I copy the names of files in a finder window to a text document?

    If using Apple TextEdit Applications: Select all the files in the finder window, choose copy. Go to the TextEdit window and from the menu choose Edit then choose Paste and Match Style from the Edit drop down menu.

  • How to split a password-protected PDF file?

    There is a tutorial to let you know how to split a password-protected pdf file, check in here:http://www.kvisoft.com/tutorials/split-a-password-protected-PDF-file.html

    Yup. You all are right. I ordered Adobe Acrobat today and the order is still processing. I can get to Adobe Acrobat.com but that too does not work. I guess I will have to wait until my order is processed before I get the keys to the kingdom. Thanks for your help and please forgive my ignorance.Regards,Bob

  • How do I copy or delete a file in my machine in a Stored Procedure.

    How do I copy or delete a file in my machine in a Stored Procedure.
    UTL_FILE package can'nt do it?
    thanks

    write java stored procedure or pro*c program to do that

  • HT4108 How can I copy movie in iPad from my pc ?

    How can I copy movie in iPad from my pc?

    You sync it to your iPad.
    http://i1224.photobucket.com/albums/ee374/Diavonex/Album%204/9d04e8509b150edc93a 9a8b2adc4dc59.jpg

  • How do I copy/move files?

    What class do I use to copy/move files? I looked in java.io.file but I didn't see anything appropriate.

    Thanks for the point about NT and AIX. The exact reason I'm looking at this is to develop a stored procedure in an Oracle DB which will assist with backup operations on both NT and AIX. Thus whatever I do needs to work both places. We already have OS specific scripts that I'd like to get rid of . . .

  • How can I copy the dmg installer file to a thumbdrive?

    So we purchased a new iMac. The geniuses at the apple store installed Mountain Lion using their installation software. I want a backup copy of the installation files.
    I was able to use unix/terminal to boot and display the boot disk and begin the installation process, which I intended to save to an external hard drive and copy the dmg file to a thumbdrive BEFORE the computer automatically restarted and deleted it. I even opened a microsoft word document thinking that without saving it would halt the restart process, but no. The computer restarted automatically without giving me the opportunity to copy the dmg file.
    Does anyone have any ideas? Is there a unix command to halt the restart?
    Thanks.

    What I did when I got a new Macbook Pro was to get a 16GB USB Thumb Drive (or was it 32GB) and used SuperDuper to clone the boot disk to the USB Thumb Drive.  (Carbon Copy Cloner could also be used).
    Now I have a bootable copy of my Macbook Pro while it was young and uncluttered with all my junk.  The clone  has all my extra apps, such as iPhoto, Garageband, iMove, etc... that is not part of the Mac OS X distribution, and you only get when buying a new Mac.
    When doing an upgrade, I download the new version (Lion, Mountain Lion, future "Cat"), and they quit the installer before it does anything.  Now looking in Applications, there is an "Install OS X Lion", or "Install OS X Mountain Lion", etc...  I made a copy of that app on a USB Thumb Drive or DVD.  There have also been instructions on the web about how to make this into a bootable DVD or Thumb Drive.  I have not bothered with that, as I have my above mentioned original clone I can boot from, and there is always the recovery partition I can boot from as well.
    If you wish to have the Mac boot back into the initial setup mode, you can remove the following file and reboot:
    rm /var/db/.AppleSetupDone

  • How can I copy my folders or files in my Ipad?

    I'm a biginner. How can I copy on my iPad some windows files or folder?

    Start by reading the User's Guide, then maybe you'll have some relevant, intelligent questions about how to use the device.

  • How to SPLIT data from Uploaded :AZT file at ";"

    Dear All Experts,
    I need to upload an :AZT file and then SPLIT the data of .AZT fiel at ";" into various fields into an internal table "itab" and then I need to save/update these data of internal table "itab" to database table "ZLT_AZT" . But I am facing some problems in the output. So please follow the following to understand my problem and please suggest me as how to SPLIT the data correctly at each ";".
    1) The code that I wrote in se38.
    2) The attachement; Projekt ABAP AZT file upload doubt5.jpg;  the screen shot of the output that i am getting in internal table "itab" during debugging after my code is executed in se38
    PROBLEM: I am unable to SPLIT the data at ";".
    3) The attachement; Projekt ABAP AZT fiel upload doubt4.jpg: the screen shot of the data populated in database table "ZLT_AZT" in se11.
    PROBLEM:              i) I am not able to see all the columns. I am only able to see the 8 if  9 columns. I did go to Sellting--> Format List-->Choose Fields and                                                 selected all the fields but it didn't worked. Also I went to Settings-->User Parameters-->Databrowser and here  I tried to  change the width of                                          output list but still it didn't work.
    1) So the  code in se38 is:
    DATA  itab  TYPE STANDARD TABLE OF zlt_azt.
    DATA  wa_tab TYPE zlt_azt.
    DATA: file_str1 type string.
    Parameters: p_file1 type localfile.
    At selection-screen on value-request for p_file1.
                                           CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
                                            EXPORTING
                                               STATIC              = 'X'
                                             CHANGING
                                               file_name           = p_file1.
    Start-of-Selection.
      file_str1 = P_file1.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      = file_str1
      tables
        data_tab                      = itab
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT itab  INTO wa_tab.
        SPLIT wa_tab AT ';' INTO  wa_tab-M2   wa_tab-k2   wa_tab-A2   wa_tab-P2  wa_tab-S2   wa_tab- D1  wa_tab-STD  wa_tab-BES.
      Write: sy-uline(120),
              / sy-vline,
                2 wa_tab-M2,
               11 sy-vline,
               13 wa_tab-k2,
               25 sy-vline,
               27 wa_tab-A2,
               32 sy-vline,
               34 wa_tab-P2,
               39 sy-vline,
               41 wa_tab-S2,
               46 sy-vline,
               48 wa_tab-D1,
               60 sy-vline,
               62 wa_tab-STD,
               72 sy-vline,
               74 wa_tab-BES,
              120 sy-vline.
    ENDLOOP.
    MODIFY zlt_azt FROM TABLE itab.
    Looking forward to your valuable feedback to my new problems.
    Best regards
    Chandan Kumar

    Hi Chandan,
    I am sorry for typing wrong at a place - Now try the corrected one
    data  it_string   type stringtab.
    data lv_string    type string.
    DATA  itab  TYPE STANDARD TABLE OF zlt_azt.
    DATA  wa_tab TYPE zlt_azt.
    DATA: file_str1 type string.
    Parameters: p_file1 type localfile.
    At selection-screen on value-request for p_file1.
                                           CALL FUNCTION 'KD_GET_FILENAME_ON_F4'
                                            EXPORTING
                                               STATIC              = 'X'
                                             CHANGING
                                               file_name           = p_file1.
    Start-of-Selection.
      file_str1 = P_file1.
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      = file_str1
      tables
        data_tab                      = it_string
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    LOOP AT it_string  INTO lv_string.   " <<<<< previously I wrote loop at itab>>>
    clear wa_tab.
    SPLIT lv_string AT ';' INTO  wa_tab-M2   wa_tab-k2   wa_tab-A2   wa_tab-P2  wa_tab-S2   wa_tab- D1  wa_tab-STD  wa_tab-BES.
    append wa_tab to itab.
      Write: sy-uline(120),
              / sy-vline,
                2 wa_tab-M2,
               11 sy-vline,
               13 wa_tab-k2,
               25 sy-vline,
               27 wa_tab-A2,
               32 sy-vline,
               34 wa_tab-P2,
               39 sy-vline,
               41 wa_tab-S2,
               46 sy-vline,
               48 wa_tab-D1,
               60 sy-vline,
               62 wa_tab-STD,
               72 sy-vline,
               74 wa_tab-BES,
              120 sy-vline.
    ENDLOOP.
    MODIFY zlt_azt FROM TABLE itab.
    Regards,
    Rachna

  • How to split a movie in the project window

    I spent a lot of time dragging clips up into the project window, inserting lots of title frames, and editing clips. When exporting to iDVD discovered that the projet is 2x too big. How do I split the movie into two halves in the project window without having to re-do the whole project?

    Exit your project so your are back at the Project Library List. You should see your project as a filmstrip in the list. Right-click or control click on your project name and select Duplicate. You will now have 2 copies of your project. Duplicate it again to be safe.
    Then, delete the first half of one of the duplicates, and delete the second half of the other duplicate.

  • How can I copy my iPhoto library file to my other macs?

    I have 4 Mac's and I've kept all my photos on one of them primarily. How can I find the iPhoto library file and copy it to the other Macs?

    There are two apps that can do that for your.
    1 - the better of the two is  iPhoto Library Manager.  You will have to manually select those Events in Library A that are not in Library B and copy them to B.  Then do the same for B to A.  This also copies both the original and edited versions, keywords, titles, descriptions, faces and places.
    2 - the second app is SyncPhotos.  This one is automatic and will copy the original images in A that are not in B into B and the same for B to A. This does not copy edited versions or any of the metadata, i.e. keywords, etc.

  • How can I copy movies into iPhone from my PC?

    How can I put movies into Iphone from PC.
    When I'm trying to put video files into library (mp4 format) it not appear in my iTunes library.

    You sync it to your iPad.
    http://i1224.photobucket.com/albums/ee374/Diavonex/Album%204/9d04e8509b150edc93a 9a8b2adc4dc59.jpg

  • How do you convert mov to wav files?

    How do you convert .mov files to .wav files in iMovie 10? I can no longer find the Share/Quicktime/Options tabs.

    * the .mov container can be handled by any PC with a free download of Quicktime for Windows; but many PC users hesitate doing so, because on the Apple website it looks like you instali iTunes too... many PC don't like that...
    * .mp4 can be handled by any actual PC mediaplayer... again: PC users are used to import .wmv (or the very old .avi container/not supported by YouTube)
    * for exporting .wmv on a Mac, you need to buy a licence at www.flip4mac.com
    * mpeg... the MotionPictureExpertGroup published many codecs... mpeg1, mpeg2, mpeg4, h261, h264. .... but using iM as exporter, all these mpegs will be "hidden" in the QT container .mov... with QTpro you can strip-off the container, but I recommed the beginner to use one of the above mentioned options......

Maybe you are looking for