in reply to Accessing files at certain line number
Presuming some variant of *NIX and a shell that groks {00..49} notation (zsh, and I believe bash):
mkdir out for i in infiles{01..49} ; do ( cd out ; split -l 1024 -a 5 ../$i ${i:s,infiles,,} ) done for i in $(perl -le 'print for "aaaaa".."aaazz"') ; do cat out/{01..49}$i > segment_$i done rm -rf ./out for i in segment_* ; do processing $i done
Modifying to automagically determine the maximum split partition name left as an exercise for the reader.
The cake is a lie.
The cake is a lie.
The cake is a lie.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Accessing files at certain line number
by ikegami (Patriarch) on Sep 21, 2009 at 15:14 UTC |