![]() |
|
|
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 |
| Changing one column of delimited file column to fixed width column | manneni prakash | Shell Programming and Scripting | 5 | 06-22-2009 06:27 AM |
| two files.say a and b.both have long columns.i wanna match the column fron 1st file w | TRUPTI | UNIX for Dummies Questions & Answers | 4 | 10-17-2008 02:17 PM |
| Insert first line of a file to first column of remaining files | a_artha | Shell Programming and Scripting | 5 | 07-28-2008 06:47 AM |
| How to check Null values in a file column by column if columns are Not NULLs | Mandab | Shell Programming and Scripting | 7 | 03-15-2008 09:57 AM |
| join cols from multi files into one file | vbshuru | Shell Programming and Scripting | 2 | 11-20-2003 12:52 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Just came back from vacation. My apologies for late response.
If it's not too late yet, here is a part of code I used: for i in `cat map| awk 'BEGIN { FS = " " }; { print $2}'` do isql -S*** -U*** -P*** -w 900 >> /tmp/tmp.out << EOF use db1 go select "$i", count(*) from table1 tb1 join table2 tb2 on tb2.id2 = tb1.id1 join table3 tb3 on tb3.id3 = tb2.orderid where tb1.number <> 0 and tb3.name = "$i" go EOF cat /tmp/inv-tmp.out|grep "$i">>/tmp/file.out done After I chage the bold line to "for i in `cat map| awk '{print $2}'`" , with awk 'BEGIN...' part removed, it started to go through. Thanks! |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|