![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Rules & FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how i prepare a c++ code(c code) for implementing my own protocol format | amitpansuria | High Level Programming | 1 | 09-06-2007 08:09 PM |
| Failed to check status code in "rsh" command | nir_s | Shell Programming and Scripting | 9 | 07-03-2006 06:05 AM |
| SSH key code versus server key code | Texan | Security | 1 | 04-12-2006 08:57 AM |
| Script to check for a file, check for 2hrs. then quit | mmarsh | UNIX for Dummies Questions & Answers | 2 | 09-16-2005 11:46 AM |
| check my code?? running shell from c? | abdul | UNIX for Dummies Questions & Answers | 1 | 09-03-2001 12:05 AM |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
HTML Code:
#!/bin/sh #For Daily Routine echo 'Checking in Progress ...' echo > status.txt echo >> status.txt for i in IVR011 IVR012 IVR021 IVR022 do echo >> status.txt echo ' ****** '$i ' *******' >> status.txt echo >> status.txt rsh $i df -k >> status.txt echo >> status.txt rsh $i sar 1 5 >>status.txt echo >> status.txt rsh $i ppaid check all >> status.txt echo >> status.txt done echo 'done' and also since in this code i m using "rsh" .. which do sometimes prompt for username and password .. can i add these two parameters in my code with every "IVR"..if yes .. how ? waiting for reply . regards |
| Forum Sponsor | ||
|
|
|
|||
|
I don't remember about varsions of sh, but I think at some point more modern Bourne shell supports:
Code:
#place this just below the magic number (1st) line set -n The HPUX 11.0 version of /bin/sh supports it at any rate... and it was first shipped in the 1990's. |
|
|||
|
Well i just checked that how many shells i have on my system . it prompted like
/sbin/sh /bin/tcsh /bin/true and i work in "tcsh" which is C shell perhaps ... does this shell support any sort of debugging ... besides .. does this code make a logic to you ... i mean i m just thinking hard that if i could check it on system or not .. Regards |
|
|||
|
I don't know csh or tcsh.
set -n is designed to check syntax - what you asked. You have sh which will probably do. Try it. Try it at the command prompt when you are in sh. Code:
sh set -n exit |
|
|||
|
Thanks .. this is fine and fortunately i have found a workstation to play with aswell :-D
HTML Code:
rsh $i df -k >> status.txt echo >> status.txt su - ops cd severe show tsp and store the output of "show tsp" in same 'status.txt' regards |