Re: ONE LINE PERL COMMAND

2001-06-04 Thread Jeff Pinyan
On Jun 4, Pedro A Reche Gallardo said: >perl -ne 'BEGIN{$/=">"}if(/^\s*(\S+)/){open(F,">$1")|| warn"$1 write >failed:$!\n";chomp;print F ">", $_}' >This command will take a file like this: >name1: anything kdkdkkdkk dkdkkdkdk >name2: anything slkslsksksl >and convert it into two files, named

Re: ONE LINE PERL COMMAND

2001-06-04 Thread Paul
--- Pedro A Reche Gallardo <[EMAIL PROTECTED]> wrote: > Hi, please have a look to this perl one line command. > perl -ne 'BEGIN{$/=">"}if(/^\s*(\S+)/){open(F,">$1")|| warn"$1 write > failed:$!\n";chomp;print F ">", $_}' > > > This command will take a file like this: > > >name1: anything > kd

Re: ONE LINE PERL COMMAND

2001-06-04 Thread John Joseph Trammell
On Mon, Jun 04, 2001 at 11:46:00AM -0400, Pedro A Reche Gallardo wrote: > Hi, please have a look to this perl one line command. > perl -ne 'BEGIN{$/=">"}if(/^\s*(\S+)/){open(F,">$1")|| warn"$1 write > failed:$!\n";chomp;print F ">", $_}' > > This command will take a file like this: > > >name1: