scripting a cut!
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: scripting a cut!

  1. #1

    Question

    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
    The brain is a wonderful organ; it starts working the moment you get up in the morning and does not stop until you get into the office.

  2. #2
    Join Date
    Feb 2002
    Posts
    27
    YES , IF U WILL POST SOME PART OF UR TEXT FILE.


  3. #3
    Join Date
    Feb 2002
    Posts
    27
    OR URSELF TRY THE EASIEST PIPE UTILTY
    GREP AND GREP -V

  4. #4
    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!!
    The brain is a wonderful organ; it starts working the moment you get up in the morning and does not stop until you get into the office.

  5. #5
    Join Date
    Feb 2002
    Posts
    27
    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

  6. #6
    Join Date
    Feb 2002
    Posts
    27
    SORRY ONE CHANGE
    use double quotes for

    "DEFAULT STORAGE"

  7. #7

    Talking

    many Thanks for your help.... :-)
    The brain is a wonderful organ; it starts working the moment you get up in the morning and does not stop until you get into the office.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width