![]() |
|
|
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 |
| multiple array | vakharia Mahesh | UNIX for Dummies Questions & Answers | 2 | 01-27-2008 02:02 AM |
| How to store query multiple result in shell script variable(Array) | div_Neev | Shell Programming and Scripting | 4 | 11-06-2007 08:10 PM |
| create array holding characters from sring then echo array. | rorey_breaker | Shell Programming and Scripting | 5 | 09-28-2007 09:42 AM |
| How to write multiple echo statements in unix? | Shrutiduggal | Shell Programming and Scripting | 2 | 01-09-2007 04:27 AM |
| multiple conditions in if statements | tim mauger | Shell Programming and Scripting | 3 | 04-28-2002 10:42 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
multiple 'if' statements out of array
I want to do multiple comparisons on a series of numbers from an array:
I send the numbers in file1 through want to print out some info from file2 based on some conditions. The syntax just isn't correct??? awk ' NR==FNR{ a[NR]=$0 next } { for(i=1;i<NR;i++) if (a[i] < $7 && a[i] > $8) print $1, if (a[i] < $8 && a[i] > $9) print $2, if (a[i] < $5 && a[i] > $4) print $3, }' file1 file2 > outfile & any help would be great ![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|