hi,
Does anyone know of any SED or unix scripts that I can run.?
I have a very large create table script, and I want to cut out all the storage parameters from this. It is not possible to use VI as it would take hours? Can anyone help ???
thanks
Printable View
hi,
Does anyone know of any SED or unix scripts that I can run.?
I have a very large create table script, and I want to cut out all the storage parameters from this. It is not possible to use VI as it would take hours? Can anyone help ???
thanks
YES , IF U WILL POST SOME PART OF UR TEXT FILE.
OR URSELF TRY THE EASIEST PIPE UTILTY
GREP AND GREP -V
CREATE TABLESPACE "PS_DEFAULT"
LOGGING DATAFILE '/oradata/psprod/data/ps_default.dbf' SIZE 50M REUSE
AUTOEXTEND ON NEXT 1024K MAXSIZE 200M
DEFAULT STORAGE ( INITIAL 1024K
NEXT 1024K
MINEXTENTS 1
MAXEXTENTS 200
PCTINCREASE 0 )
/
CREATE TABLESPACE "BNAPP"
LOGGING DATAFILE '/oradata/psprod/data/bnapp.dbf' SIZE 10M REUSE
AUTOEXTEND ON
NEXT 5120K
MAXSIZE 100M
DEFAULT STORAGE ( INITIAL 64K
NEXT 128K
MINEXTENTS 1
maxextents 200
pct increase 0 )
/
CREATE TABLESPACE "HRAPP"
LOGGING DATAFILE '/oradata/psprod/data/hrapp.dbf' SIZE 120M REUSE
AUTOEXTEND ON NEXT 5120K
MAXSIZE 240M
DEFAULT STORAGE ( INITIAL 64K
NEXT 128K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0 )
/
++++++++++++++++++++++++++++++++++++++++
THE LIST GOES ON FOR APPROX 40 MORE TABLES!!!!
I need to cut the storage clause out form all these tables, if I do this manually it will take hours!!
CAT FILENAME | GREP -V AUTOEXTEND | GREP -V DEFAULT STORAGE | GREP -V NEXT 1024K | GREP -V EXTENTS | GREP -V PCTINCREASE 0 > NEWFILE
HOPE IT WILL HELP U
SORRY ONE CHANGE
use double quotes for
"DEFAULT STORAGE"
many Thanks for your help.... :-)