running multiple rsh command in a script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting running multiple rsh command in a script
# 1  
Old 10-31-2006
running multiple rsh command in a script

hi scripting experts,

juz wondering if it's possible to have multiple rsh command in a single script? Smilie

ie:

rsh -l <username> "<command>"

rsh -l <username> "<command>"

thanks.

regards,

wee Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Issue with running multiple commands withing su command

RHEL 6.2/Bash shell root user will be executing the below script. It switches to oracle user and expect to do the following things A. Source the environment variables for BATGPRD Database (the file used for sourcing is shown below after the script) B. Shutdown the DB from sqlplus -- The... (13 Replies)
Discussion started by: omega3
13 Replies

2. Shell Programming and Scripting

Running a command for multiple folders at once

Hi I have folders 1 to 24 (24 folders in total) and inside those folders I have the same file names. I have a command that I want to run but rather than do it individually I was wondering if there is a command to run them all at once. Thanks Phil (3 Replies)
Discussion started by: phil_heath
3 Replies

3. Shell Programming and Scripting

running multiple command in a single line

Hi Can we run the linux command and per script in a single command $ cd /usr/local/adm/ ;ctsv scmtest_qabuild ;cspec.pl scmtest This is a combination of linux and clearcase command and last one is perl script with argument. I can see the first and 2nd coomand is executing but last... (6 Replies)
Discussion started by: anuragpgtgerman
6 Replies

4. Shell Programming and Scripting

running multiple command in same line

I have 5 hosts and each host as 3 java process .I have one machine which has ssh keys so it can login without any passwords etc to all the machines. How can I find out say jstack or some command so it goes to each machine and run the command . For example machine 1 has 3 java process and they... (2 Replies)
Discussion started by: gubbu
2 Replies

5. Shell Programming and Scripting

Running a command on multiple selected files in nautilus script

I am trying to make a script to convert drg files to wav and so far i have this #!/bin/bash drg2sbg "$*" -o "$*".sbg sbagen -Wo "/home/nick/Desktop/I-Doser Wave Files/"$*"" "$*".sbg rm "$*".sbg cd "/home/nick/Desktop/I-Doser Wave Files" rename 's/\.drg$/\.wav/' *.drg exit the drg2sbg and... (2 Replies)
Discussion started by: Nickbowlingdude
2 Replies

6. UNIX for Dummies Questions & Answers

Script to kill rsh processes running for more than 10 mins

Hi Friends, I need to write a script to kill some processes running for more than 10 minutes. Can I get some pointers on that. Thanks for ur help in Advance. Thanks&Regards, Amit (3 Replies)
Discussion started by: amitsayshii
3 Replies

7. Shell Programming and Scripting

script to kill rsh processes running for more than 10 minutes

Hi Friends, I need to write a script to kill some processes running for more than 10 minutes. Can I get some pointers on that. Thanks for ur help in Advance. Thanks&Regards, Amit (1 Reply)
Discussion started by: amitsayshii
1 Replies

8. UNIX for Advanced & Expert Users

script to kill rsh processes running for more than 10 minutes

Hi Friends, I need to write a script to kill some processes running for more than 10 minutes. Can I get some pointers on that. Thanks for ur help in Advance. Thanks&Regards, Amit (1 Reply)
Discussion started by: amitsayshii
1 Replies

9. Shell Programming and Scripting

I need a Script to rsh multiple hp boxes and shutdown

Hello I'm serving on a ship that has frequent power issues. Currently if we loose power we need to rush around to multiple UNIX machines and login to Sysadmin and power down each machine before we loose our ups. If sysadmin is asleep or not in the space we have some real problems. I would like to... (2 Replies)
Discussion started by: blackfam972
2 Replies

10. Shell Programming and Scripting

Multiple rsh in a script not working

Hi, From one of the unix servers i want execute an rsh command to 5 different servers. i want to go to these servers execute a command and come back. i have a main program which calls a function, where in i use the rsh command. The server name is passed as a parameter to teh function. it is... (3 Replies)
Discussion started by: praphul
3 Replies
Login or Register to Ask a Question
rsh(1M) 						  System Administration Commands						   rsh(1M)

NAME
rsh, restricted_shell - restricted shell command interpreter SYNOPSIS
/usr/lib/rsh [-acefhiknprstuvx] [argument...] DESCRIPTION
rsh is a limiting version of the standard command interpreter sh, used to restrict logins to execution environments whose capabilities are more controlled than those of sh (see sh(1) for complete description and usage). When the shell is invoked, it scans the environment for the value of the environmental variable, SHELL. If it is found and rsh is the file name part of its value, the shell becomes a restricted shell. The actions of rsh are identical to those of sh, except that the following are disallowed: o changing directory (see cd(1)), o setting the value of $PATH, o pecifying path or command names containing /, o redirecting output (> and >>). The restrictions above are enforced after .profile is interpreted. A restricted shell can be invoked in one of the following ways: 1. rsh is the file name part of the last entry in the /etc/passwd file (see passwd(4)); 2. the environment variable SHELL exists and rsh is the file name part of its value; the environment variable SHELL needs to be set in the .login file; 3. the shell is invoked and rsh is the file name part of argument 0; 4. the shell is invoke with the -r option. When a command to be executed is found to be a shell procedure, rsh invokes sh to execute it. Thus, it is possible to provide to the end- user shell procedures that have access to the full power of the standard shell, while imposing a limited menu of commands; this scheme assumes that the end-user does not have write and execute permissions in the same directory. The net effect of these rules is that the writer of the .profile (see profile(4)) has complete control over user actions by performing guaranteed setup actions and leaving the user in an appropriate directory (probably not the login directory). The system administrator often sets up a directory of commands (that is, /usr/rbin) that can be safely invoked by a restricted shell. Some systems also provide a restricted editor, red. EXIT STATUS
Errors detected by the shell, such as syntax errors, cause the shell to return a non-zero exit status. If the shell is being used non- interactively execution of the shell file is abandoned. Otherwise, the shell returns the exit status of the last command executed. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
intro(1), cd(1), login(1), rsh(1), sh(1), exec(2), passwd(4), profile(4), attributes(5) NOTES
The restricted shell, /usr/lib/rsh, should not be confused with the remote shell, /usr/bin/rsh, which is documented in rsh(1). SunOS 5.10 1 Nov 1993 rsh(1M)