Sponsored Content
Full Discussion: rcp error trapping in rsh
Top Forums Shell Programming and Scripting rcp error trapping in rsh Post 89373 by vvejendla on Saturday 12th of November 2005 12:59:49 AM
Old 11-12-2005
rcp error trapping in rsh

I am writing a program which is something like below:

rsh host1 "rcp file dest:directory"

I am running this script from a machine host2.

host1 has rlogin configuration for host2.
but, dest machine has no rlogin configuration for host1 and fails on remote calls.

Could anyone tell me how to trap the exit status of rcp command executed here.

Basically, I wanted to trap the exit status of the actual command executed by rsh.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

ftp error trapping

Hi I'm hoping I could get some help on the following. I'm writing a script which will in turn create an ftp script then excecute it. eg echo "user $user $pass" > $script echo "cd $remote_dir" >> $script echo "bi" >> $script echo "mput $file" >> $script echo "bye" >> $script ftp -n -i $ip... (1 Reply)
Discussion started by: Bab00shka
1 Replies

2. UNIX for Advanced & Expert Users

rcp & rsh

Hi everybody, I have a problem with rcp & rsh command from Winnt 4 to an AIX machine. I would like to use rsh from Winnt on Unix but it works only with some machines of the domain. With the others, an error message appears and say : "myadress.com: rshd: 0826-826 The host name for your address... (2 Replies)
Discussion started by: dfrangidis
2 Replies

3. UNIX for Dummies Questions & Answers

ftp error trapping

I have written a UNIX script that will automatically ftp a file to a server. The problem is when I missed enter information w/in the .txt file that contains the userid/password and what file to transfer, I had no way of capturing the failuer of the file transfer. I verified w/in the script that the... (1 Reply)
Discussion started by: dhawkjrscripter
1 Replies

4. Shell Programming and Scripting

Error Trapping

Hi, Can anybody tell me how to error trap an empty line. If i am asked for a password and I hit enter without entering any text, how do i display an error? Thanks Kev (6 Replies)
Discussion started by: kev112
6 Replies

5. UNIX for Advanced & Expert Users

how to check rsh/rcp between 2 servers

Hi, I need to check if rsh and rcp are enabled between to servers. What is the command to check both ? Servers : SunOS 5.10 Generic_120011-14 sun4u sparc SUNW,Sun-Fire-V445 SA says that it is configured , so what setting I need to do ? These must be enable for ORACLE id on... (1 Reply)
Discussion started by: reply2soumya
1 Replies

6. Shell Programming and Scripting

ftp, rlogin , rcp, rsh are not wroking

Hi Friends I am facing one problem, I am not able to use ftp, rlogin , rcp, rsh in a particular server. when I am trying to ftp certain file from that server it is giving Connection closed by remote host. Now from other unix box I am not able to rlogin that particular server. as .rhosts... (3 Replies)
Discussion started by: itsjoy2u
3 Replies

7. Red Hat

How to enable and test the rsh and rcp in RHEL 5.3?

Hello, Can you help me on how to activate the rsh and rcp services. And also how do i test it after i have enable it Thanks. (7 Replies)
Discussion started by: shtobias
7 Replies

8. Shell Programming and Scripting

Error Trapping

Hi, I have one shell script as below while read SegList do if test -s ${SourceFile_Path}/${Segment_List_Temp} then ls -r -1 ${FTP_Path}/${SegList}.DAT.${Datelist}.GZ|cut -d '.' -f2>>${SourceFile_Path}/${List_Temp} echo "IF above statment Fail I want to Create Emtpy File How to Trapp... (3 Replies)
Discussion started by: samadhanpatil
3 Replies

9. AIX

RCP slow down and blocks login, telnet, rsh, etc on target server

Hello I have a LPAR AIX 6.1 on Power VM, Vio 2.2.3 and when I execute a rcp to this machine, I cant, simultaneosly, rlogin, telnet, rsh to this same LPARt. This commands stay hanged till the copy end, and Imeddiatlely the comand is executed (rlogin, telnet, rhs, etc). Someone can give me... (1 Reply)
Discussion started by: artur_dietrich
1 Replies

10. Shell Programming and Scripting

Trapping the error during copy

I have a requirement: During copy command for example: cp -rf <sourceDir> <destinationDir> this command may fails for many reasons like: 1. source or destination directory does not exist 2. destination directory does not have sufficient space 3. directories are not mounted ... Or may... (3 Replies)
Discussion started by: ambarginni
3 Replies
RCP(1)							    BSD General Commands Manual 						    RCP(1)

NAME
rcp -- copy file to and from remote machines SYNOPSIS
rcp [-45FKpxz] [-P port] file1 file2 rcp [-45FKprxz] [-P port] file... directory DESCRIPTION
rcp copies files between machines. Each file argument is either a remote file name of the form ``rname@rhost:path'' or a local file (contain- ing no colon or with a slash before the first colon). Supported options: -4, -5, -K, -F, -x, -z These options are passed on to rsh(1). -P port This will pass the option -p port to rsh(1). -p Preserve file permissions. -r Copy source directories recursively. DIAGNOSTICS
rcp is implemented as a protocol on top of rsh(1), and thus requires a working rsh. If you intend to use Kerberos authentication, rsh needs to be Kerberos aware, else you may see more or less strange errors, such as "login incorrect", or "lost connection". HISTORY
The rcp utility first appeared in 4.2BSD. This version is derived from 4.3BSD-Reno. HEIMDAL
April 16, 2003 HEIMDAL
All times are GMT -4. The time now is 04:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy