Retrieving data


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Retrieving data
# 1  
Old 06-23-2006
Data Retrieving data

Friends,

I have a data with 3 columns:

30 41 1
39 19 4
14 25 3
....
....
.....

I want to retrieve any data in the first column that is greater 15. What is the best way to do this?

Thanks!
# 2  
Old 06-23-2006
Code:
-- if you want the whole line of data
awk ' $1>15 ' oldfilename > newfilename
-- if you want just column #1
awk ' { if($1> 15) {print $1} } ' oldfilename > newfilename

# 3  
Old 06-23-2006
MySQL

Jim,

Thank you very much!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Passing argument not retrieving.

Hi I have a script which am trying to pass an argument which am trying to call using $1 but its not taking the value inside the if loop as it showing the error as if: Empty if.. Any help on this will be helpful. #!/usr/bin/csh echo $1 if ('$1' == "pp") then echo "Printing $1" endif (4 Replies)
Discussion started by: rogerben
4 Replies

2. Shell Programming and Scripting

Retrieving sequence data from other file

Hello experts :cool:, I am new to programming and will need your help.. I have 2 very large files with the following format: FILE1: >MLP1019 PL4 >MLP7456 PL3 >MLP9268 PL9 >MLP6245 PL1 FILE2: >MLP1019 STNAPLQTSNTWVSYQPSMMMSLQ >MLP7456 PPYWYWNSAVMIFYVQPLSLLAVLLA >MLP9268... (2 Replies)
Discussion started by: narachaid
2 Replies

3. UNIX for Dummies Questions & Answers

retrieving data between two strings

I have input file like AAA AAA CCC CCC CCC EEE EEE EEE EEE FFF FFF GGG GGG i was trying to retrieve data between two strings using sed. sed -n /CCC/,/FFF/p input_file Am getting output like CCC CCC CCC (22 Replies)
Discussion started by: NareshN
22 Replies

4. Shell Programming and Scripting

Retrieving data from 65th col (of each line) ?

Hello Friends, I am in situation where I have to note down few SQL queries from specific hexdump format. Here is an example (the query text starts at 65th character on each line) ---------------------- 0x000007FEB0E701C0 : 7365 6C65 6374 2063 7573 746E 6F2C 2020 select custno, ... (9 Replies)
Discussion started by: Sunusernewbie
9 Replies

5. Linux

Retrieving Data from VHD File (Virtual Machine Harddrive)

Hello, I had Gentoo installed on a Microsoft Windows Hyper-V virtual machine. The system shutdown properly but the RAID array on the drive it was on failed. We had a backup that was poorly configured and as such we didn't back up all of the data we needed. Therefore, after getting the RAID... (0 Replies)
Discussion started by: ckoeber
0 Replies

6. Shell Programming and Scripting

Retrieving File name

Hi All.. I have a Filename as FAB1_600015_CONRAD.A0_7XYZ12345.000_LT-SWET.01_LTPA25L_20110622-161429_07_WFR12345_20110622-161429_20110712-125228.data.dis I want to get the result as... (5 Replies)
Discussion started by: asheshrocky
5 Replies

7. Shell Programming and Scripting

Retrieving a specific value

I have this input file: I want to get the following output file: Output Basically, the program would scan the file and look for every instance where the value is < 14.0 dB. The program would then print the row that contains that value along with the corresponding name with the ">". Be... (8 Replies)
Discussion started by: Ernst
8 Replies

8. UNIX and Linux Applications

Retrieving data from a database and store to a file

Hi I'm using and Oracle 10g Database. I want to write a script to retrieve data from the database and store it toa file. I'm using simple sql statements such as Select * from celltable I don't know how to specify the database name etc. I have this but it doesn't work ... (1 Reply)
Discussion started by: ladyAnne
1 Replies

9. HP-UX

Retrieving the full command

Hi All, I would like to retrieve the whole command that got executed for a running process rather than a truncated string, as a result of running ps -ef on HP-UX. Please help. TIA (1 Reply)
Discussion started by: trocadero
1 Replies

10. Shell Programming and Scripting

Using loop reading a file,retrieving data from data base.

Hi All, I am having trouble through, I am reading the input from tab delimited file containing several records, e.g. line1 field1 field2 field3 so on.. line2 field1 field2 field3 so on.. .. .. on the basis of certain fields for each record in input file, I have to retrieve... (1 Reply)
Discussion started by: Sonu4lov
1 Replies
Login or Register to Ask a Question