Problem revisited:
-----
The above approach would not be right since it would give the wrong result if the ssh command failed. So a better approach may be to let the other side provide the echo:
This User Gave Thanks to Scrutinizer For This Post:
Hi,
I'm a complete novice at Unix and need to create a script that does the following...
checks to see if an application server is running.
If the app is running then print 'Available'
Else print 'Unavaliable'
exit from scriopt
I have no idea where to start. I'd be very grateful... (0 Replies)
Here is the command I want to run:
for pkg in `pkginfo | grep -i VRTS | awk '{print $2}'`; do showrev -p | grep $pkg; done | awk '{print $2 "\t" $7}' | uniq
It returns the package info in a form such as:
113210-03 VRTSfspro
112392-06 VRTSvmman
113596-03 VRTSvmpro... (1 Reply)
--------------------------------------------------------------------------------
I am running a test command and if the user is not found you have to type exit and it wiil exit. Ok I did that. But if the user is found it is supposed to finger them. But my problem is it makes you type exit first... (2 Replies)
Hi,
Im writing a script that will check which scripts are running. The script will run on a 5min loop and the status of the scripts will be written to the log. If any of the scripts arent running an email will be sent out.
At the min if all scripts are running an entry is made to the log... (19 Replies)
Hi All,
The script which i am using to SSH to remote server is working fine when i run is using ./ but when cron runs it it gives error that "ssh: not found"
please help!!! (3 Replies)
Hi All ,
I am new to shall scripting, i want write an script for oracle tns and listener.
If tns working i want o/p as "Listener and TNS are working"
else o/p should be ""Listener and TNS are not Working"
below is the command in unix to check the tns status, if no output it means TNS... (3 Replies)
Hi,
i have a shellscript, where in i need to connect to different server start these three jobs and exit from the server and start the same three jobs on local server.
ssh user@remotehost 'bash -s' << EOF
${GETT_HOME}/bin/start1 &
sleep 10
${GETT_HOME}/bin/start2 &
sleep 10... (1 Reply)
Hi All,
I am trying to run my script using ssh. Below is the code snippet
#!/bin/bash
ssh username@useipapd03 'bash -s'
#To ensure If JMSdirectory exists or not
if
then
echo "JMS mounts................exist'>>OutputResult.txt
else
echo "JMS mounts................not... (10 Replies)
I am trying to run a command. This is one of my attempts:
for i in fileservera; do ssh -t $i 'sudo ls /';doneThis works, and I see the directories. However, what I want to do now is start a process on the remote server such as /usr/bin/connectproc -standalonesudo /usr/bin/connectproc... (1 Reply)