![]() |
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 |
| rsh script with inside a for loop | trekianov | Shell Programming and Scripting | 5 | 12-06-2008 12:39 PM |
| remsh inside of while loop | joettacm | UNIX for Advanced & Expert Users | 1 | 12-07-2007 12:54 PM |
| Repetitive Tasks: using if..then inside a loop | garak | Shell Programming and Scripting | 2 | 03-13-2006 07:36 AM |
| input inside while read loop | jhansrod | Shell Programming and Scripting | 3 | 08-13-2005 10:46 AM |
| read inside a while loop | dta4316 | UNIX for Dummies Questions & Answers | 3 | 05-21-2005 10:53 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
||||
|
Dear All,
i have a awk script where i'm using while loop inside while loop here is the code: awk -v DATE="$CURRDATE" -v -F'@' 'BEGIN { while(( getline < "Merge_Calldet.txt" )) { ARR=$5 LINE=$0 while(( getline < "Merge_Accessnum.txt" )) { TESTSIMENTRY=$1 FILEDATE=$15 if ( TESTSIMENTRY == ARR ) { FLAG=1 break } else { FLAG=0 continue } } if (FLAG == 1) { print "Y" "@" FILEDATE "@" LINE } else { print "N" "@" DATE "@" LINE } } }' >> Join_Calldt_Accnum.txt I'm trying to compare 5th field of Merge_Calldet.txt with the fisrt field of Merge_Accessnum.txt. means it will take 5th field from first line of Merge_Calldet.txt and will compare of entire first field of Merge_Accessnum.txt file. again it will take the 5th field from second line of Merge_Calldet.txt and so on. but the problem is in the flow is coming inside the second while loop only for one tiime. can anyone plz suggest me the mistake i have done. Thanks, Regards, Pankaj |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|