Sponsored Content
Top Forums Shell Programming and Scripting plz help in writing awk script Post 302126818 by LAKSHMI NARAYAN on Friday 13th of July 2007 09:07:42 AM
Old 07-13-2007
plz help in writing awk script

hi buddies

pls help in this matter

i have file like this input file
--------------------------
(PARTITION PARTITION_1 VALUES LESS THAN (101, 16383 ) TABLESPACE PART_1
,PARTITION PARTITION_2 VALUES LESS THAN (101, 32766 ) TABLESPACE PART_2
,PARTITION PARTITION_3 VALUES LESS THAN (101, 49149 ) TABLESPACE PART_3
,PARTITION PARTITION_4 VALUES LESS THAN (101, 65535 ) TABLESPACE PART_4
,PARTITION PARTITION_3 VALUES LESS THAN (101, 49149 ) TABLESPACE PART_3
,PARTITION PARTITION_4 VALUES LESS THAN (101, 65535 ) TABLESPACE PART_4
,PARTITION PARTITION_5 VALUES LESS THAN (102, 16383 ) TABLESPACE PART_5
,PARTITION PARTITION_6 VALUES LESS THAN (102, 32766 ) TABLESPACE PART_6
,PARTITION PARTITION_7 VALUES LESS THAN (102, 49149 ) TABLESPACE PART_7
,PARTITION PARTITION_8 VALUES LESS THAN (102, 65535 ) TABLESPACE PART_8 ) ;

i need out file like this:
---------------------
(PARTITION PARTITION_1 VALUES LESS THAN (101, 4095 ) TABLESPACE PART_1
,PARTITION PARTITION_2 VALUES LESS THAN (101, 8191 ) TABLESPACE PART_2
,PARTITION PARTITION_3 VALUES LESS THAN (101, 12287 ) TABLESPACE PART_3
,PARTITION PARTITION_4 VALUES LESS THAN (101, 16383 ) TABLESPACE PART_4
,PARTITION PARTITION_5 VALUES LESS THAN (101, 20478 ) TABLESPACE PART_5
,PARTITION PARTITION_6 VALUES LESS THAN (101, 24574 ) TABLESPACE PART_6
,PARTITION PARTITION_7 VALUES LESS THAN (101, 28670 ) TABLESPACE PART_7
,PARTITION PARTITION_8 VALUES LESS THAN (101, 32766 ) TABLESPACE PART_8
,PARTITION PARTITION_9 VALUES LESS THAN (101, 36861 ) TABLESPACE PART_9
,PARTITION PARTITION_10 VALUES LESS THAN (101, 40957 ) TABLESPACE PART_10
,PARTITION PARTITION_11 VALUES LESS THAN (101, 45053 ) TABLESPACE PART_11
,PARTITION PARTITION_12 VALUES LESS THAN (101, 49149 ) TABLESPACE PART_12
,PARTITION PARTITION_13 VALUES LESS THAN (101, 53245 ) TABLESPACE PART_13
,PARTITION PARTITION_14 VALUES LESS THAN (101, 57342 ) TABLESPACE PART_14
,PARTITION PARTITION_15 VALUES LESS THAN (101, 61438 ) TABLESPACE PART_15
,PARTITION PARTITION_16 VALUES LESS THAN (101, 65535 ) TABLESPACE PART_16
,PARTITION PARTITION_17 VALUES LESS THAN (102, 4095 ) TABLESPACE PART_17
,PARTITION PARTITION_18 VALUES LESS THAN (102, 8191 ) TABLESPACE PART_18
,PARTITION PARTITION_19 VALUES LESS THAN (102, 12287 ) TABLESPACE PART_19
,PARTITION PARTITION_20 VALUES LESS THAN (102, 16383 ) TABLESPACE PART_20
,PARTITION PARTITION_21 VALUES LESS THAN (102, 20478 ) TABLESPACE PART_21
,PARTITION PARTITION_22 VALUES LESS THAN (102, 24574 ) TABLESPACE PART_22
,PARTITION PARTITION_23 VALUES LESS THAN (102, 28670 ) TABLESPACE PART_23
,PARTITION PARTITION_24 VALUES LESS THAN (102, 32766 ) TABLESPACE PART_24;
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

plz Help How should I configure cc compiler output file plz help???

i.e configuration of C compiler :confused: (4 Replies)
Discussion started by: atiato
4 Replies

2. Shell Programming and Scripting

hi help in writing awk script(urgently)

hi to all i have file like this file.txt this is naryana expect hyderabad is a cool place now climate VISAKHSAPATNAM became very cool #vizag is my birth place #hyderabad is a cool place #now climate of hyd became very cool #vizag is my birth place #hyderabad is a cool place ... (7 Replies)
Discussion started by: LAKSHMI NARAYAN
7 Replies

3. Shell Programming and Scripting

help in writing awk script, plz urgent

I have a file like this I have to I have input file this , I want to give the out put in the below input file (NARAYANA 1 ENDING AT (100, 16383) ,NARAYANA 2 ENDING AT (100, 32766) ,NARAYANA 3 ENDING AT (100, 49149) ,NARAYANA 4 ENDING AT (100, 65535) ,NARAYANA 5... (8 Replies)
Discussion started by: LAKSHMI NARAYAN
8 Replies

4. Shell Programming and Scripting

Help needed in writing awk script for xml source

Hi, i am not able to get an approach for converting xml file to flat file using awk programming. Can anyone help me out. The input xml is like this: <outer> <field1>one</field1> <field2>two</field2> <field3>three<Error Code=777 Description=12345/></field3> <field4>four</field4> </outer>... (2 Replies)
Discussion started by: naren_0101bits
2 Replies

5. Solaris

plz help me in writing a script

Hi all, I want to write a script which gather all files who where having a particular name.The script should run at the end of each month. The files(Audit and health files) are generated each day. I want to gather the files seperately into corresponding folders and so that i can ftp'ed... (3 Replies)
Discussion started by: Renjesh
3 Replies

6. Shell Programming and Scripting

Explain this AWK script plz

Hi frnds, one my frnds has given resolution for my problem as below. it working great , but i couldnt understand somethings in the script. Why ++ operator after the function calling. how these each block working. will each run for each input line sequencially or one block for all the lines... (9 Replies)
Discussion started by: Gopal_Engg
9 Replies

7. Shell Programming and Scripting

Help in writing a find/replace script using awk

Hi All, I need to write a script that will go through 600+ files and perform find and replace. I was going to use sed but there is a level of complexity that is doing my head in. To explain: I have 600+ files that have a line in them that reads (for example) FILE=DCLCLHST... (4 Replies)
Discussion started by: Kocko
4 Replies

8. UNIX for Dummies Questions & Answers

Writing awk script to read csv files and split them

Hi Here is my script that calls my awk script #!/bin/bash set -x dir="/var/local/dsx/csv" testfile="$testfile" while getopts " f: " option do case $option in f ) testfile="$OPTARG";; esac; done ./scriptFile --testfile=$testfile >> $dir/$testfile.csv It calls my awk... (1 Reply)
Discussion started by: ladyAnne
1 Replies

9. UNIX for Dummies Questions & Answers

awk: issues for writing a script

%%%%% (7 Replies)
Discussion started by: lucasvs
7 Replies

10. Shell Programming and Scripting

help with writing a awk/sed script

Hi, I thought I am getting pretty good with sed and awk, but now I dont have a way out of this question. I have a table 0.5 16 1.3 14 0.25 15 0.85 16 I want to make a column 3 which contains values that are (corresponding $2 value/sum of all $2). Please help me out here. Thanks. (6 Replies)
Discussion started by: jamie_123
6 Replies
ALTER 
TABLESPACE(7) SQL Commands ALTER TABLESPACE(7) NAME
ALTER TABLESPACE - change the definition of a tablespace SYNOPSIS
ALTER TABLESPACE name RENAME TO newname ALTER TABLESPACE name OWNER TO newowner DESCRIPTION
ALTER TABLESPACE changes the definition of a tablespace. You must own the tablespace to use ALTER TABLESPACE. To alter the owner, you must also be a direct or indirect member of the new owning role. (Note that superusers have these privileges automatically.) PARAMETERS
name The name of an existing tablespace. newname The new name of the tablespace. The new name cannot begin with pg_, as such names are reserved for system tablespaces. newowner The new owner of the tablespace. EXAMPLES
Rename tablespace index_space to fast_raid: ALTER TABLESPACE index_space RENAME TO fast_raid; Change the owner of tablespace index_space: ALTER TABLESPACE index_space OWNER TO mary; COMPATIBILITY
There is no ALTER TABLESPACE statement in the SQL standard. SEE ALSO
CREATE TABLESPACE [create_tablespace(7)], DROP TABLESPACE [drop_tablespace(7)] SQL - Language Statements 2010-05-14 ALTER TABLESPACE(7)
All times are GMT -4. The time now is 10:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy