in reply to Re: Splitting long file
in thread Splitting long file

This seems closer. (NB: Win32 quotes switch to *nix-style)

perl -044ne '($n,$d)=m!\n?([^\n]+)\n([^\$]+)!s;open O,">$n";print O $d +' file
Update: 044 removed from command line
D'oh.


davis
It's not easy to juggle a pregnant wife and a troubled child, but somehow I managed to fit in eight hours of TV a day.