![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| search for a string -perl | meghana | Shell Programming and Scripting | 11 | 02-12-2008 09:44 PM |
| Perl: Search for string on line then search and replace text | Crypto | Shell Programming and Scripting | 4 | 01-04-2008 10:24 AM |
| Search string in array (perl) | man | Shell Programming and Scripting | 6 | 07-24-2007 12:14 PM |
| perl: string comparison as numbers | bishweshwar | UNIX for Advanced & Expert Users | 7 | 05-27-2007 01:54 AM |
| Perl: Search for string then parse next line | pondlife | Shell Programming and Scripting | 4 | 04-06-2006 05:44 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Perl: Search for string on line then compare numbers!
Hi All,
I have a file that I need to be able to find a pattern match on a line, take the number on that line check if its >0.9 or <0.1 and if this is true write the line to output.out file. An example of 4 lines in my file is: 1. driver.I177.I11.net010 1.48622200477273e-05 2. driver.I177.I11.net018 0.999979181369536 3. driver.I177.I11.net019 0.699980513717918 4. driver.I177.I11.net23 1.05599228036606e-05 5. vsub 2.42896969967089e-05 The above is an example of four lines. I want to find all the lines containing "driver" (lines 1,2,3 and 3) check if the numbers meet 0.1<x<0.9 and write the lines that match to a output file (line 3). Hope that makes sense!! Many thanks |
| Bookmarks |
| Tags |
| awk, perl script |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|