How to remove no max value and order?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to remove no max value and order?
# 1  
Old 02-28-2013
How to remove no max value and order?

How do I remove maxvalue and noorder?

I've a list of files with the following similar content

Code:
Prompt Sequence SEQ_AD_ID;
CREATE SEQUENCE SEQ_AD_ID
  START WITH 1
  MAXVALUE 1000000000000
  MINVALUE 1
  NOCYCLE
  CACHE 10
  NOORDER;

to

Code:
Prompt Sequence SEQ_AD_ID;
CREATE SEQUENCE SEQ_AD_ID
  START WITH 1
  MINVALUE 1
  NOCYCLE
  CACHE 10

how do achieve the above? I need to achived this with a list of files.

thanks a lot!
# 2  
Old 03-01-2013
Code:
sed '/MAXVALUE\|NOORDER/d;' file

# 3  
Old 03-01-2013
Code:
awk '!/MAXVALUE|NOORDER/' file

Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Remove duplicates by keeping the order intact

Hello friends, I have a file with duplicate lines. I could eliminate duplicate lines by running sort <file> |uniq >uniq_file and it works fine BUT it changes the order of the entries as it we did "sort". I need to remove duplicates and also need to keep the order/sequence of entries. I... (1 Reply)
Discussion started by: magnus29
1 Replies

2. Shell Programming and Scripting

Searching max

Basically I have a file num1 which contains IP addresses I need to find max element of third number in IP address which is 25! And after that relating to max third number I need to find max fourth number which is 237 (6th line) (22 Replies)
Discussion started by: Manu1234567
22 Replies

3. Shell Programming and Scripting

Get the MAX value out of a column

I've the following data set. I would like to look at the column 3 and only use the rows which has the max value for column 3 Can we use the awk or sed to achieve it. 10 2 10 100 11 2 20 100 12 2 30 100 13 2 30 100 14 ... (7 Replies)
Discussion started by: rudoraj
7 Replies

4. Shell Programming and Scripting

script for remove descending order number

hi all i want to remove some descending order number example : 1 100 200 135.00 Gk_wirs 1 1 100 200 136.00 Gk_wirs 50 1 110 210 138.00 Gk_wirs 60 1 100 200 136.00 Gk_wirs 57 ----> how to remove... (6 Replies)
Discussion started by: nithyanandan
6 Replies

5. UNIX for Advanced & Expert Users

How to remove duplicate lines of a record without changing the order

Hi all, I have to remove duplicate lines in a file without chainging the order.for eg if i have a record pqr def abc lmn pqr abc mkh hgf the output should be pqr def abc lmn mkh hgf (7 Replies)
Discussion started by: abhi.roy03
7 Replies

6. UNIX for Dummies Questions & Answers

Read file and remove max length

Hi all, I tried to write a shell to read huge file and eliminate max length record which is wrong generated record. But I get an error remove_sp.sh: line 27: syntax error near unexpected token `else' remove_sp.sh: line 27: ` else $LINE >> REJFILE' My shell is here: #!/bin/sh... (5 Replies)
Discussion started by: mr_bold
5 Replies

7. Shell Programming and Scripting

max value

Hi All, I want to choose the maximum value from a column values. eg - 234 23 567 43 2456 5 678 8978 from thses values how to choose the max value ? thanks. roger. (3 Replies)
Discussion started by: Nayanajith
3 Replies

8. Shell Programming and Scripting

Finding max value

My code below is supposed to find which company had the most business and then print the appropriate fields from another file which are the companies ID number and name. I can loop through awk and display all the total amount of business for each company but I need help in only printing out the... (1 Reply)
Discussion started by: Enigma23
1 Replies

9. UNIX for Dummies Questions & Answers

Max I/O Size

My HP-UX 11.0 system is supporting an Oracle database. I have found a number of references on the Net to the "Max I/O size" in relation to setting Oracle parameters. How can I tell what my max i/o size is? I originally made the assumption that it was referring to my stripe size but now I think... (1 Reply)
Discussion started by: keelba
1 Replies
Login or Register to Ask a Question