![]() |
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 |
| Plz correct my syntax of shell script | girish.batra | Shell Programming and Scripting | 2 | 06-06-2008 07:36 AM |
| Is the script correct ??? | jaganadh | Shell Programming and Scripting | 0 | 12-13-2007 04:50 AM |
| plz correct this | wannalearn | Shell Programming and Scripting | 8 | 04-26-2007 08:56 AM |
| Please Correct this Array Script | psreddy1234 | Shell Programming and Scripting | 6 | 07-07-2006 07:07 PM |
| Correct Syntax For Calling Shell Script in Perl Module | mh53j_fe | Shell Programming and Scripting | 4 | 06-08-2005 11:42 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Please correct my Script
I am new to awk, can somone please correct the following script
awk -F "," 'BEGIN { foreach ((getline < "file1.csv") > 0) {i++ a[i]=1 --> assuming the first column in the row will be stored in a[] foreach (a[i] in f1) { if (a[i] == $5) continue print a[i]; } } } file2.csv' Here is what I want to do File 1 laeg.com,2/2/23,a,b,ga aeg.com,2/2/23,a,b,ga xyz.com,2/2/12,a,b,c eg.com,2/2/23,a,b,ga File 2 1,2,ua,xyz.com 1,2,ua,abc.com 1,2,ua,eg.com 1,2,ua,easg.com 1,2,ua,zth.com File 3 laeg.com,2/2/23,a,b,ga aeg.com,2/2/23,a,b,ga while reading in file1 it should compare in each row on file2 if found any where in the file2 it should be ignored while writing into output file. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|