![]() |
|
|
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 |
| bat file opening multiple IE windows | Pitt | Windows & DOS: Issues & Discussions | 2 | 04-04-2009 12:06 AM |
| Can BASH execute commands on a remote server when the commands are embedded in shell | bash_in_my_head | Shell Programming and Scripting | 1 | 12-04-2008 01:51 AM |
| Shell script to call multiple java commands | vivekdn | Shell Programming and Scripting | 4 | 09-03-2008 01:28 AM |
| Opening multiple documents at once | Orange Stripes | Shell Programming and Scripting | 2 | 05-12-2008 12:56 PM |
| Opening a UNIX shell in Java | guyi | Shell Programming and Scripting | 2 | 08-13-2007 06:00 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
The code below works, but takes too many lines and looks awkward: Code:
db2 "export to $filename of del select * from $table with ur"|tee -a $LOGFILE|awk '/Number of rows exported:/ {print $5}' > numrows.tmp
numrows=$(cat numrows.tmp)
rm numrows.tmp
When I try the statement below instead, I get a message saying there's no connection to the database. That's because it opened a new shell. It's opening a new shell when I give more than just the db2 command. How can I get the code below work: Code:
numrows=$(db2 "export to $filename of del select * from $table with ur"|tee -a $LOGFILE|awk '/Number of rows exported:/ {print $5}' )
Thanks in advance Naveen Last edited by Franklin52; 08-27-2009 at 04:42 PM.. Reason: Please use code tags! |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|