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
--- 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
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: