![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Need Help with awk and arrays | fusionX | Shell Programming and Scripting | 7 | 02-11-2008 06:41 PM |
| awk arrays | imonthejazz | Shell Programming and Scripting | 1 | 09-21-2007 10:29 AM |
| arrays in awk??? | craigsky | Shell Programming and Scripting | 3 | 08-27-2007 10:13 PM |
| ksh script - arrays | sidamin810 | Shell Programming and Scripting | 13 | 07-18-2005 04:07 AM |
| KSH and arrays | whited05 | Shell Programming and Scripting | 1 | 06-24-2005 01:07 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
|||||
|
Hi Nitin,
I think the reason your dates are all the same is because your print lastdate statement is in the END section of the awk script. This means awk will print what ever the value of lastdate is for the last record. You can confirm this by looking at the date for the last input record and see if that is the same as your script output. Sorry I don't know how to fix this. I am not sure how you would do a multi-dimensional array in awk, but I am sure it can be done. Your idea of 2 arrays may work as well but you will have to ensure the rows line up correctly so user1 doesn't display user2's lastdate. Good Luck, TioTony |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|