![]() |
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. |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
awk help
Hi,
When printing the stored vale from file a2 ,its giving only 2 records(skipping USD) instead of getting 3 records .I want to print 3 records awk 'BEGIN{FS=OFS="|"} NR==FNR{a[$1]=$2;next} {print a[$1]}' a2 a1 GD1 SGD cat a2 4500|USD|2000.00|10000.000|00000.0000000000 450006|GD1|1000.200|3000.000|000.0000000000 450002|SGD|3000.000|20000.00|0090.000000000 cat a1 450000|USD|USD 450006|GKSGD|SGD 450002|XSGD|SGD Thanks, MR |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|