Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by westwood01

  1. westwood01

    running script in cron vs cmd line

    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...
  2. westwood01

    running script in cron vs cmd line

    # 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?
  3. westwood01

    running script in cron vs cmd line

    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.
  4. westwood01

    running script in cron vs cmd line

    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...
  5. westwood01

    case script cannot exit

    Just noticed your question. not a typo, just how I am passing around some of the data...
  6. westwood01

    case script cannot exit

    Thanks I'll try that. You mentioned the indentation. Is using it needed when scripting or is strictly for being easier to read?
  7. westwood01

    case script cannot exit

    Edited code: #!/bin/ksh while true do echo " 1) View ALL Failed Save Sets 2) Create Tickets for SERVER1 Failed Save Sets q) Quit" echo "" read input case $input in 1) clear echo "" echo "Listing of All Failed Save Sets:" echo "" awk '{print $0}' data.dat;; 2) clear...
  8. westwood01

    case script cannot exit

    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.
  9. westwood01

    case script cannot exit

    Well...I tried the suggestions you all noted above, but I am still unable to exit from the script back to a prompt. I also had a coworker look at it and he too was not able to get it to exit. I will post my script again on the hopes of generating some new ideas. Thanks. #!/bin/ksh while...
  10. westwood01

    group lines in file by common field

    Thanks Annihilannic - worked perfectly.
  11. westwood01

    group lines in file by common field

    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...
  12. westwood01

    case script cannot exit

    I was playing around with adding the break. Do I need one break per while true or one per select?
  13. westwood01

    case script cannot exit

    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.
  14. westwood01

    case script cannot exit

    Thanks guys, I'll look into your suggestions.
  15. westwood01

    case script cannot exit

    Below is an example of a case script I'm using. The script works as expected, except for the q (quit/exit) option; it won't exit. Actually the script does exit properly if I choose q before choosing any other option. Unlike if I choose 2, then try and q, it wont work. I believe it has...

Part and Inventory Search

Back
Top