"Voytek" <[EMAIL PROTECTED]> writes: > # grep 'Current Database' koala > -- Current Database: atom > -- Current Database: commodore > -- Current Database: digiprint > -- Current Database: documents > .....
Practicing my awk, try this
awk 'BEGIN { bakfile = "nodb.sql" }
{ if (/^-- Current Database:/)
bakfile = $4 ".sql"
}
{
print >bakfile
}' < koala
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
