![]() |
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 |
| running command in while loop | gefa | Shell Programming and Scripting | 2 | 11-21-2007 07:27 AM |
| for loop with db2 command | Vaddadi | Shell Programming and Scripting | 1 | 10-05-2007 12:51 PM |
| Help with a simple loop command! | dfs | Shell Programming and Scripting | 8 | 05-18-2007 01:27 PM |
| rsh command in a while loop | Nicol | Shell Programming and Scripting | 6 | 11-19-2003 01:08 PM |
| Using cat command in a for loop | sleepster | UNIX for Dummies Questions & Answers | 1 | 09-12-2003 01:19 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Pb in while loop with ssh command
Hi
I use the following command to check if my_base is active or not : active_db=`${LOCAL_BIN}/ssh -l ${my_user} ${my_service} "ps -ef | grep ora_smon | grep ${my_base} | sed -e \"s/ */ /g\" | cut -d'?' -f2 | cut -d' ' -f3 | cut -d'_' -f3"` When I use a file listing databases to check them by a loop, it doesn't work : (file contains one database per line) cat $my_file | while read line do (...) active_db=`${LOCAL_BIN}/ssh -l ${my_user} ${my_service} "ps -ef | grep ora_smon | grep ${line} | sed -e \"s/ */ /g\" | cut -d'?' -f2 | cut -d' ' -f3 | cut -d'_' -f3"`(...) done "it doesn't work" simply means the firt line is processed but the loop finish after it. Thx for your lights in advance. Rgds. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|