thanks guys, I ended up going a different route. Instead of trying to initiate an ssh or telnet session in the script I just did an rsh. This ultimately gave me what I was looking for, since the box I was testing was oddly rebooting into single user mode, so if my rsh (telnet or ssh) failed I...
# more mylog
kill: 16760: no such process
I'm now thinking that the script is returning a failed run code, since the kill $! is failing to find a process. Is this more a problem with the writing of the script as opposed to running it out of cron?
I tried using the first two suggestions:
specifying full ssh path
adding su - root -c /path/to/myscript to cron
Script still fails.
I'll have to install nmap to try the nmap option, since I dont have it by default w/ solaris10.
When I run the below script from the cmd line it works as expected. The script will accurately detect whether an ssh connection is available. But, when I put this same script in cron it fails every time, even when an ssh connection is available. Any ideas? Or possibly a better method to...
.... . ."
./maketicket2
else
echo "Request Cancelled";sleep 1
break
fi
done;;
q) echo "Exiting . . . ";sleep 1;exit;;
*) echo "Please Make Another Selection";sleep 1;;
esac
done
Results:
After chosing option 2 and doing work, the script returns to the main menu as...
I had removed the calls of ./script as well as add a break, but it did not work, so I just went back to my original code. I will try your suggestions again, post the edited code and tell you the results. thanks.
This is a follow-up to my original post. The awk PHV worked well, and it now looks like this:
awk -F":" '
$4!=s{if(n>1)print " server:"s": All";n=0}
{print;s=$4;++n}
END{if(n>1)print "'date' server:"s": All"}
' tmp.server > tmp2.server
My question is, how can I modify the...
I removed the lines of the script calling itself and it works just the same - you were right they were unnecessary entries. However, I still cannot quit from the menu. I will look into the break command unless you guys have another suggestion.
Sure. The lines of my input.file are currently arranged/sorted by server name. The server name is specified in the second field ($2), this is with the fields separated by the " : ". As in the example:
$1 $2 $3
homer: server1:/var/legato/rman/bin/ebuarch.PRTLDEV
homer...
First off, this site is such an amazing resource. Thanks to you all.
Suppose I have an input.file that looks like:
homer: server1:/var/legato/rman/bin/ebuarch.PRTLDEV
homer: server1:/var/legato/rman/bin/ebuarch.PRTLPROD
homer: server1:/var/legato/rman/bin/ebuarch.PRTLQA
homer...
Below is a portion of a (ksh) case script. The way the menu works now is, via the select statement I can only choose one of the numbered options at a time. Is there a way to choose multiple options?
For example, if I run the script and choose option 3, I will be presented with a list that...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.