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

Simon Lovell simonl at unwired.com.au
Sun Jun 29 19:22:54 EST 2008


Mark,
I think that's the best tip I've heard all year.  But I'd suggest 
something more like:

awk '/^copy/,/\\p\\g/ {next}
{ print }' copy.in

I've been looking for a way of automating copy scripts acting directly 
on gzip files using named pipes, and using fastload for binary copy 
ins.  You've shown me a very easy way of doing it.

Mark Luijendijk wrote:

> Gareth,
>  
> 2 options:
>  
> 1. (if your Ingres version supports this): copydb -u<dba> <db> 
> -with_tables -with_modify -with_index -with_views (etc.)
> 2. awk '(/create table/||/create view/||/create index/||/create 
> unique/||/modify/||/grant /),/\\p\\g/' copy.in <http://copy.in>
>  
> Good luck!
>  
> Mark
>
>  
> On 6/26/08, *gareth.2.edwards at bt.com <mailto:gareth.2.edwards at bt.com>* 
> <gareth.2.edwards at bt.com <mailto:gareth.2.edwards at bt.com>> wrote:
>
>     Hi,
>
>     Anyone have a script to remove the copy statements from the
>     copy.in <http://copy.in>?
>
>     I want to just create all the tables/indexes etc, but don't want the
>     copy statements. My nawk/awk is rusty.
>
>     Cheers,
>     Gareth Edwards
>
>     BT Global Services
>     t: +44 (0)131 300 1907
>     e: Gareth.2.Edwards at BT.com
>
>     ________________________________________________________________
>     OpenROAD-Users mailing list
>
>     You can maintain your subscription here:
>     http://www.peerlessit.com/mailman/listinfo/openroad-users
>
>     To unsubscribe click on this link
>     mailto:openroad-users-unsubscribe at peerlessit.com
>     <mailto:openroad-users-unsubscribe at peerlessit.com>&subject=unsubscribe
>
>     To subscribe click on this link
>     mailto:openroad-users-subscribe at peerlessit.com
>     <mailto:openroad-users-subscribe at peerlessit.com>&subject=subscribe
>
>
>------------------------------------------------------------------------
>
>________________________________________________________________
>OpenROAD-Users mailing list
>
>You can maintain your subscription here:
>http://www.peerlessit.com/mailman/listinfo/openroad-users
>
>To unsubscribe click on this link
>mailto:openroad-users-unsubscribe at peerlessit.com&subject=unsubscribe
>
>To subscribe click on this link
>mailto:openroad-users-subscribe at peerlessit.com&subject=subscribe 
>
>------------------------------------------------------------------------
>
>
>No virus found in this incoming message.
>Checked by AVG. 
>Version: 8.0.101 / Virus Database: 270.4.1/1519 - Release Date: 6/25/2008 4:13 PM
>  
>


More information about the Openroad-users mailing list