>I have a text file that can be anywhere from 40,000 lines to 120,000
>Lines,
>
>I want it to split the file so that no file is larger then 20,000 lines
>
>1) run a line count
>2) split the file into pieces
Hello,
Unix/Linux has a "split" shell command which is very suitable for your purpose.
Gladstone Daniel - dglads wrote:
> I have a text file that can be anywhere from 40,000 lines to 120,000
> Lines,
>
> I want it to split the file so that no file is larger then 20,000 lines
>
> 1) run a line count
> 2) split the file into pieces
perl -pe'($.-1)%20_000 or open STDOUT,">",$ARGV
At Wednesday, 28 February 2007, "Gladstone Daniel - dglads" wrote:
>I have a text file that can be anywhere from 40,000 lines to 120,000
>Lines,
>
>I want it to split the file so that no file is larger then 20,000 lines
>
>1) run a line count
>2) split the file into pieces
>***
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Gladstone Daniel - dglads wrote:
> I have a text file that can be anywhere from 40,000 lines to 120,000
> Lines,
>
> I want it to split the file so that no file is larger then 20,000 lines
>
> 1) run a line count
> 2) split the file into pieces
No