in reply to Re: Extracting each line in a file to new file seperately
in thread Extracting each line in a file to new file seperately

ok so i have to do use split command:
split -l 300 newfile.txt with looping k thank you for ur valuble suggestion

  • Comment on Re^2: Extracting each line in a file to new file seperately

Replies are listed 'Best First'.
Re^3: Extracting each line in a file to new file seperately
by aaron_baugher (Curate) on Feb 10, 2012 at 23:28 UTC

    Except that that will split your file into files with 300 lines each. If you want one line each, you'll need to use `split -l 1 file.orig new.`. Also, by default, split will use two-character lowercase alpha suffixes (aa .. zz) to name the new files, so it'll run out if you split into more than 676 chunks. Check the split man page for how to increase that.

    Aaron B.
    My Woefully Neglected Blog, where I occasionally mention Perl.