Quote:
Originally Posted by aaaaargh
Here is mine, ugly but should do the trick
(not tested)
Code:
awk 'BEGIN{i=0}
{ content[NR]=$0; if (($0=="")) {b[i]=NR;i++} j++;}
END
{
for (x=0;x<=b[0];x++)
{print content[x] > "file1" } for (x=b[1];x<=j; x++) { print content[x] > "file2"}
}' /var/tmp/file
|
Thanks for the reply. Unfortunately I'm new to this and can't figure out how to implement this into my script. Below is the last two lines of the script to get the file I had above.
system "dos2unix ansi3 > ansi7";
system "mv ansi7 ansi3";
Thanks again for any help.