[Openroad-users] Removing copy statements from copy.in

Paul White pwhite at peerlessit.com.au
Fri Jun 27 00:58:12 EST 2008


Hi Gareth,

I was hoping there might be an option provided by copydb but could not
find one.
I think we could use a with_no_data option.
Maybe better to ask over at info-ingres.


This will change the \nocontinue to \continue so you can ignore errors
on the copy statements.
(but then also will ignore any other errors)

sed '
s/^\\nocontinue/\\continue/
' copy.in >  copynew.in


This will strip out all paragraphs beginning with copy and ending in
\p\g

sed -n '
/^copy /,/\\p\\g/ d
p
' copy.in > copynew.in


Or similarly in nawk if you feel more comfortable

nawk '
/^copy /,/\\p\\g/               {next}
                                {print}
' copy.in > copynew.in



Paul



More information about the Openroad-users mailing list