10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a script named check which will read the content of a file and check wether those files exist in the current directory. If so it will have the exit status of 0, otherwise it will have 1.
check script:
#!/bin/bash
if ; then #Check there is enough command line parameters.
exit 1... (2 Replies)
Discussion started by: Ray Sun
2 Replies
2. Shell Programming and Scripting
see below for a housekeeping script which constructs an ssh cmd using some server/path/sudo info found in $HRINST.
the script should hop to each server and if it finds a file to cleanup, moves it to the archive dir
if there is nothing to move, it should report so and email the output
... (3 Replies)
Discussion started by: jack.bauer
3 Replies
3. Shell Programming and Scripting
Hello;
I regularly run monitoring scripts over ssh to monitoring scripts
But whenever a server is hung or in maintenance mode, my script hangs..
Are there anyways to trap exit status and be on my way ??
Looked at the ssh manpage and all I can see is a "-q" option for quiet mode ..
Thank... (2 Replies)
Discussion started by: delphys
2 Replies
4. Shell Programming and Scripting
I have a shell script (#!/bin/sh) that interacts with Appworx and Banner Admin. In my script I want to check the exit status of awrun before continuing. awrun can run for 10 seconds or it can run for over a minute. So my question is, will it go through my if statement before awrun may even be... (2 Replies)
Discussion started by: smkremer
2 Replies
5. Shell Programming and Scripting
Hello All
My req is to store the exit status of a command in shell variable
I want to check whether the file has header or not
The header will contain the string
DATA_ACQ_CYC_CNTL_ID
So I am running the command
head -1 $i | grep DATA_ACQ_CYC_CNTL_ID
Now I have to check if... (6 Replies)
Discussion started by: Pratik4891
6 Replies
6. Shell Programming and Scripting
Hi All,
I have developed below script for FTP a file from unix machine to another machine.
ftpToABC ()
{
USER='xyz'
PASSWD='abc'
echo "open xx.yy.zbx.aaa
user $USER $PASSWD
binary
echo "put $1 abc.txt" >> /home/tmp/ftp.$$
echo "quit" >> /home/tmp/ftp.$$
ftp -ivn <... (3 Replies)
Discussion started by: RSC1985
3 Replies
7. Shell Programming and Scripting
Hi friends,
I'm newbie to shell script. I wanted to create a shell script which able to write a result for all the telnet connection status. For example, from this machine I want to test the telnet connection (total 100+ servers) with this machine.
Any idea how to write this shell script?... (16 Replies)
Discussion started by: yhcheong
16 Replies
8. Programming
I have a java classpath running inside of a unix shell script. During my testing it will error with lines that show an example like this below.
java.io.FileNotFoundException error
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:129),
... (2 Replies)
Discussion started by: mmcds
2 Replies
9. Shell Programming and Scripting
Hi,
I have tried with the following code;
if ;then
echo "Failure."
else
echo "Success."
fi
to test the exit status of the test.ksh shell script. But whatever is the exit status of the test.ksh shell script Failure. is always printed.
Please help.
regards,
Dipankar. (2 Replies)
Discussion started by: kdipankar
2 Replies
10. Shell Programming and Scripting
i downloaded a text file from metalab.unc.edu called sh.txt and in this reference manual it refers to shell scripting exit status .. at the end of one of the examples that author gave an exit status of 127..
to what does a 127 exit status refer too and what is its purpose in the code.
moxxx68 (1 Reply)
Discussion started by: moxxx68
1 Replies