Sponsored Content
Full Discussion: trimming lines
Top Forums Shell Programming and Scripting trimming lines Post 302356589 by crackthehit007 on Saturday 26th of September 2009 08:02:14 AM
Old 09-26-2009
code ==>
Quote:
$ORACLE_HOME/bin/sqlplus $userName@$dbSID/$passWord <<EOF
set pagesize 0;
set long 90000;
set term off echo off;
set heading off;
set feedback off;
set trimspool on;
spool /alcatel/test/Corrupted.txt;
select DBMS_METADATA.GET_DDL('INDEX','I_QOSSYSTA2IRAQOS_____N') || ';' from dual;
spool off;
SET ECHO ON
EOF
output ==>
Quote:
SQL> select DBMS_METADATA.GET_DDL('INDEX','I_QOSSYSTA2IRAQOS_____N') || ';' from dual;

CREATE INDEX "UMTSD26"."I_QOSSYSTA2IRAQOS_____N" ON "UMTSD26"."QOSSYSTA2IRAQOS
_____N" ("UNID")
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(
BUFFER_POOL DEFAULT) LOCAL
(PARTITION "PARTITION_ON_2009_09_21"
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(
BUFFER_POOL DEFAULT)
( SUBPARTITION "PARTITION_ON_2009_09_21_SP1"
TABLESPACE "MUSE") ,
PARTITION "PARTITION_ON_2009_09_22"
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(
BUFFER_POOL DEFAULT)
( SUBPARTITION "PARTITION_ON_2009_09_22_SP1"
TABLESPACE "MUSE") ,
PARTITION "PARTITION_ON_2009_09_23"
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(
BUFFER_POOL DEFAULT)
( SUBPARTITION "PARTITION_ON_2009_09_23_SP1"
TABLESPACE "MUSE") ,
PARTITION "PARTITION_ON_2009_09_24"
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(
BUFFER_POOL DEFAULT)
( SUBPARTITION "PARTITION_ON_2009_09_24_SP1"
TABLESPACE "MUSE") ,
PARTITION "PARTITION_ON_2009_09_25"
PCTFREE 10 INITRANS 2 MAXTRANS 255
STORAGE(
BUFFER_POOL DEFAULT)
( SUBPARTITION "PARTITION_ON_2009_09_25_SP1"
TABLESPACE "MUSE") )
;

SQL> spool off;
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

trimming a file...

Hi everyone I have this script that appends a line to a file to log the running status of an application. I need to write another script to run as a scheduled job in cron to trim the first x number of lines of this file. Could someone give me an idea how to do this? Regards (1 Reply)
Discussion started by: alwayslearningunix
1 Replies

2. Shell Programming and Scripting

Trimming a string

Hi, I am trying to find a script command that will let me trim leading and trailing space from a string. I have coded a SQL Select and sending the output to a file. Later I am parsing the file and reading each field. The problem is that each field uses the same size as the DB2 type it was defined... (2 Replies)
Discussion started by: fastgoon
2 Replies

3. UNIX for Advanced & Expert Users

trimming zeros

Hi, I want to trim +with leading zero's with amount fields.I know using awk for trimming leading zeros with +,but I want get the entire row itself. cat file_name |awk -F " " '{printf "%14.4f%f\n",$4}' ex: 10 xyz bc +00000234.4500 20 yzx foxic +002456.000 Expexted 10 xyz bc... (3 Replies)
Discussion started by: mohan705
3 Replies

4. UNIX for Advanced & Expert Users

Trimming the spaces

Hi, How can I remove the unwanted spaces in the line. 123456 789 ABC DEF. - I wanna remove the sapces in this line, I need the output 123456789ABCDEF. Pls help me...... (3 Replies)
Discussion started by: sharif
3 Replies

5. Shell Programming and Scripting

trimming out spaces in solaris

friends, I have a script in solaris 10 SPARC system which is like this date '+Time: %m/%d/%y %H:%M:%S' echo " GDBRR GDLRR GDBWR GDLWR GDRRR GDRWR " sar -b 10 10 |/usr/xpg4/bin/awk '!/Average/ && !/SunOS/ && !/bread/ {$1="";T=$2;T1=$3;T2=$5;T3=$6;T4=$8;T5=$9}{print(T"\t",... (1 Reply)
Discussion started by: achak01
1 Replies

6. Shell Programming and Scripting

Trimming output

I'm trying to parse an output log and I've managed to reduce the output to the lines I need. But I'm having trouble pulling out only the info I'm interested in. The output is 40+ lines and here is a sample Installing AppFresh 0.8.5.pkg from ./InstallerFiles/CustomPKG/26 (26) Installing... (2 Replies)
Discussion started by: kaltekar
2 Replies

7. Shell Programming and Scripting

trimming sequences

My file looks like this: But I would like to 'trim' all sequences to the same lenght 32 characters, keeping intact all the identifier (>GHXCZCC01AJ8CJ) Would it be possible to use awk to perform this task? (2 Replies)
Discussion started by: Xterra
2 Replies

8. Shell Programming and Scripting

Trimming a string

Hi I need to trim white spaces from strings in a file. Input file is like this: 1_rrc_CatalogGroups.csv = 607 1_rrc_Sales_TopCatalogGroups.csv = 4 1_rrc_Sales_CatalogEntries_CatalogGroup_Rel.csv = 7 Need to trim space before and after = symbol. This is my script: #!/usr/bin/ksh ... (2 Replies)
Discussion started by: sukhdip
2 Replies

9. Shell Programming and Scripting

Trimming in between the words

Hi i have a log file P12345_15728710:DEBUG:Begin P12345_15728710:DEBUG:Being P12345_15729310:DEBUG:GetAgen P12345_15726510:DEBUG:end i want to trim this file and i want like this 15728710 15728710 15729310 15726510 i tried sed ..but not working.. sed "s/.*P12345__ \(.*\)... (4 Replies)
Discussion started by: navsan420
4 Replies

10. UNIX for Dummies Questions & Answers

Trimming ends

My files look like this I need to remove the sequence GGGAAA and anything before that I also need to remove the sequence AGCCCTA and anything after that So I will end up with something like this The left side is done but I cannot get the right side correctly. I would like to use... (3 Replies)
Discussion started by: Xterra
3 Replies
SQLT-DIFF-OLD(1p)					User Contributed Perl Documentation					 SQLT-DIFF-OLD(1p)

NAME
sqlt-diff - find the differences b/w two schemas SYNOPSIS
For help: sqlt-diff -h|--help For a list of all valid parsers: sqlt -l|--list To diff two schemas: sqlt-diff [options] file_name1=parser file_name2=parser Options: -d|--debug Show debugging info DESCRIPTION
sqlt-diff is a utility for creating a file of SQL commands necessary to transform the first schema provided to the second. While not yet exhaustive in its ability to mutate the entire schema, it will report the following o New tables Using the Producer class of the target (second) schema, any tables missing in the first schema will be generated in their entirety (fields, constraints, indices). o Missing/altered fields Any fields missing or altered between the two schemas will be reported as: ALTER TABLE <table_name> [DROP <field_name>] [CHANGE <field_name> <datatype> (<size>)] ; o Missing/altered indices Any indices missing or of a different type or on different fields will be indicated. Indices that should be dropped will be reported as such: DROP INDEX <index_name> ON <table_name> ; An index of a different type or on different fields will be reported as a new index as such: CREATE [<index_type>] INDEX [<index_name>] ON <table_name> ( <field_name>[,<field_name>] ) ; "ALTER/DROP TABLE" and "CREATE INDEX" statements are not generated by the Producer, unfortunately, and may require massaging before being passed to your target database. AUTHOR
Ken Youens-Clark <kclark@cpan.org>. SEE ALSO
SQL::Translator, <http://sqlfairy.sourceforge.net>. perl v5.14.2 2012-01-18 SQLT-DIFF-OLD(1p)
All times are GMT -4. The time now is 08:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy