dickiebird
Programmer
Guys....
I have an awk(has to be awk on 3.2.5)solution which occasionally fails when the text is > 3000 bytes.(Awk limitation circa 1963 ???)
Could someone show the sed to do the same job for me ?
awk -v GBPT="$GBP" -v NEWT="$NEW" '
BEGIN {
RS="^C"
FS="^C"
ORS="\n"
OFS="\n"
}
{
if (index($0,"Sterling")
print $0 >> GBPT
else
print $0 >> NEWT
}' ${IN_FILE}
TIA ;-)
Dickie Bird
db@dickiebird.freeserve.co.uk
I have an awk(has to be awk on 3.2.5)solution which occasionally fails when the text is > 3000 bytes.(Awk limitation circa 1963 ???)
Could someone show the sed to do the same job for me ?
awk -v GBPT="$GBP" -v NEWT="$NEW" '
BEGIN {
RS="^C"
FS="^C"
ORS="\n"
OFS="\n"
}
{
if (index($0,"Sterling")
print $0 >> GBPT
else
print $0 >> NEWT
}' ${IN_FILE}
TIA ;-)
Dickie Bird
db@dickiebird.freeserve.co.uk