in reply to Re: Simultaneous one by one splitting and processing of an uneven file based on a pattern
in thread Simultaneous one by one splitting and processing of an uneven file based on a pattern
Yes I did tried these two codes, but they dont cater to the triplet selection perl -ne 'BEGIN{ $/="Processing"; } if(/^\s*(\S+)/){ open(F,">$1.out")||warn"$1 write failed:$!\n";chomp;print F "gi", $_ }'
awk -vRS="Processing" '{ print $0 > "file"t++".out" }' file.txt
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Simultaneous one by one splitting and processing of an uneven file based on a pattern
by GrandFather (Saint) on Sep 10, 2012 at 22:15 UTC |
In Section
Seekers of Perl Wisdom