in reply to Read offset into other files
As a one-liner:
perl -s -nle"BEGIN{open BIG};($undef,$l)=split;read BIG,$data,$l;print + $data" -- -BIG=bigfile.dat index.dat > outfile.dat
All one one line. Switch "s to 's on *nix.
Update: A slightly shorter version
perl -sple"BEGIN{open BIG};($undef,$l)=split;read(BIG,$_,$l)" -- -BIG=bigfile.dat index.dat >outfile.dat
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Read offset into other files
by gio001 (Acolyte) on Oct 18, 2008 at 15:35 UTC | |
by BrowserUk (Patriarch) on Oct 18, 2008 at 16:53 UTC |