10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi there,
I'm very used to use set -e to break my scripts if any command exits with a non-zero status.
As a policy, I'm willingly expecting echo hello | grep a to break the script.
The commands test 1 -eq $1 && echo hello exits with a non-zero status if $1 is not 1. BUT... It doesn't break... (2 Replies)
Discussion started by: chebarbudo
2 Replies
2. UNIX for Dummies Questions & Answers
Hello,
I need to test telnet connections using port number for few hosts.
Could you please help me?
Thanks !! (1 Reply)
Discussion started by: skhichi
1 Replies
3. 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
4. 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
5. AIX
From a Windows command prompt, when I want to test whether an IP and port is open to a connection I can use telnet:
telnet 1.2.3.4 5050
..tests whether I can connect to port 50 on host 1.2.3.4.
What is the correct context to do a similar test from an AIX console?
Thanks! (1 Reply)
Discussion started by: landog
1 Replies
6. UNIX for Dummies Questions & Answers
Hi,
Hope all your are doing well. Need a suggestion from you.
I am writing an automated shell script that will effectively check the telnet connectivity with different backends from present deployment server.
Ideally, this script reads each backend hostname from a configuration file and fires... (4 Replies)
Discussion started by: bhaskar_m
4 Replies
7. Shell Programming and Scripting
How can i test for a file if it is exist in the current directory or not using test?
i try this:
if
then echo "File not exist"
else
do somthing.......
fi
but this is not working (2 Replies)
Discussion started by: mingming88
2 Replies
8. UNIX for Dummies Questions & Answers
ssh user@host -q -n 'grep `hostname` /etc/hosts; telnet 10.100.23.45 1234;'
When i run this command remotely it is hanging and not giving me the prompt, Can anyone tell me how can I exit a telnet command remotely please.
Thanks. (10 Replies)
Discussion started by: venu_nbk
10 Replies
9. Programming
In one of my programs another process is called using the system command e.g.
lv_error = system("myproc");
where lv_error is declared as an int.
myproc would be returning 0 for success and 1 for failure. e.g.
if (success)
{
return(0);
}else{
return(1);
}
When the return code... (3 Replies)
Discussion started by: mbb
3 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I'm using a bourne shell to kick off a 3rd Pty app. This app uses Orbix. When I exit from the telnet session which started the app or hit CTRL-C at the command line, the orbix process dies, yet all other process remain.
I've tried starting the app as a background process, but it still... (1 Reply)
Discussion started by: edgarm
1 Replies