Verifying remote command status


 
Thread Tools Search this Thread
Operating Systems HP-UX Verifying remote command status
# 1  
Old 06-08-2006
Java Verifying remote command status

hello Friends,
I wanted to verify status of remote command executed on remote machine in hpux.
remsh <hostname> -l root cd /sampldir

i wanted to check weather the command executed on remote machine correctly or not by $?.
Can you tell me how to execute multiple command on remote machine.

Thanks & Regards
Ravikiran.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Check/get the exit status of a remote command executed on remote host through script

Geeks, Could you please help me out in my script and identify the missing piece. I need to check/get the exit status of a remote command executed on remote host through script and send out an email when process/processes is/are not running on any/all server(s). Here's the complete... (5 Replies)
Discussion started by: lovesaikrishna
5 Replies

2. Shell Programming and Scripting

Find the remote server status.

Hi All, I would like to connect from "Instance A" to "Instance B" with the help of sftp. Where as Instance B is having clustered servers ( 2 servers pointing same instance ). Now, my question is before connecting to "Instance B" from "Instance A" how do know whether server is running or not.... (3 Replies)
Discussion started by: Girish19
3 Replies

3. Shell Programming and Scripting

Until string from remote command equals value run remote command

I solved my issue by using the following code #!/bin/bash function GET_STATUS { #values Active Passive Failed ssh -a localhost '/home/user/fakecommand.sh' } STATE="unknown" until ] do echo $STATE sleep 5 STATUS=`GET_STATUS` echo $STATUS | grep Active &&... (1 Reply)
Discussion started by: $scipt_Kid
1 Replies

4. Solaris

Checking the port status of a remote host

Hi there I am in the process of writing a script to check whether a port on a remote system is up or not. Here's what I have so far: #!/bin/bash telnet xx.xx.xx.xx 80 | (echo "^]") if ]; then echo "Please check Web services " | mailx -s "Please check webservices... (1 Reply)
Discussion started by: notreallyhere
1 Replies

5. Shell Programming and Scripting

Status of remote servers

hi, Say me the command to check the status of server. whether its up or down (11 Replies)
Discussion started by: satheeshkr_cse
11 Replies

6. Shell Programming and Scripting

Verifying killall command usage

killall -KILL rdiff-backup Is it a valid command coz i couldn't find a -KILL option for killall in the man page. (1 Reply)
Discussion started by: proactiveaditya
1 Replies

7. Shell Programming and Scripting

Checking the status of the script on remote machine

Hi! I have a script, which calls another script on a remote machine using ssh. I need to check if the remote running script is succesful. If it is succesful I need to continue the for loop (run it on another machine) or break the loop. Please let me know if anyone has an idea on checking the... (3 Replies)
Discussion started by: nua7
3 Replies

8. Shell Programming and Scripting

Verifying if the shell command executed or not?

Hi, I am working on a shell script that would verify if the mount command has executed or not. So , i have been doing this. mount /dev/cdrom /mnt/cdrom echo "$?" if ; then echo " Mount succesful" else echo " Mount unsuccessful" fi (3 Replies)
Discussion started by: eamani_sun
3 Replies

9. Shell Programming and Scripting

Getting the exit status of a remote command

Hi to everyone. How can I get the exit status from a remote command executed with rexec? :eek: machine A has RedHat Linux 9 and the remote machine B has SCO UNIX. Code: rexec -l user -p password host sh /u/files/scripts/seq_cal.sh 2006 08 I want the exit status returned by... (1 Reply)
Discussion started by: zoonalex
1 Replies

10. Shell Programming and Scripting

How to check the file status in a remote server?

Hi All, Thanks in Advance. My requirement is there are some data files to be updated(some times new files get created) regularly in server A, these files are to be updated to the server B(backup server) by using SCP, I have to write a script for this purpose, before copying the files to server... (3 Replies)
Discussion started by: rajus19
3 Replies
Login or Register to Ask a Question
RSH(1C) 																   RSH(1C)

NAME
rsh - remote shell SYNOPSIS
rsh host [ -l username ] [ -n ] command host [ -l username ] [ -n ] command DESCRIPTION
Rsh connects to the specified host, and executes the specified command. Rsh copies its standard input to the remote command, the standard output of the remote command to its standard output, and the standard error of the remote command to its standard error. Interrupt, quit and terminate signals are propagated to the remote command; rsh normally terminates when the remote command does. The remote username used is the same as your local username, unless you specify a different remote name with the -l option. This remote name must be equivalent (in the sense of rlogin(1C)) to the originating account; no provision is made for specifying a password with a com- mand. If you omit command, then instead of executing a single command, you will be logged in on the remote host using rlogin(1C). Shell metacharacters which are not quoted are interpreted on local machine, while quoted metacharacters are interpreted on the remote machine. Thus the command rsh otherhost cat remotefile >> localfile appends the remote file remotefile to the localfile localfile, while rsh otherhost cat remotefile ">>" otherremotefile appends remotefile to otherremotefile. Host names are given in the file /etc/hosts. Each host has one standard name (the first name given in the file), which is rather long and unambiguous, and optionally one or more nicknames. The host names for local machines are also commands in the directory /usr/hosts; if you put this directory in your search path then the rsh can be omitted. FILES
/etc/hosts /usr/hosts/* SEE ALSO
rlogin(1C) BUGS
If you are using csh(1) and put a rsh(1C) in the background without redirecting its input away from the terminal, it will block even if no reads are posted by the remote command. If no input is desired you should redirect the input of rsh to /dev/null using the -n option. You cannot run an interactive command (like rogue(6) or vi(1)); use rlogin(1C). Stop signals stop the local rsh process only; this is arguably wrong, but currently hard to fix for reasons too complicated to explain here. 4.2 Berkeley Distribution April 29, 1985 RSH(1C)