Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help creating a shell script 1

Status
Not open for further replies.

limester

Technical User
Dec 29, 2004
69
0
0
CA
Hello,

I am new to scripting on Solaris. I need to create and run a shell script that will take some input and then perform the commands in the shell script, for example:

#./shellscript.sh input

contents of the script:

rcp -p input user@host1:input
rsh -l user host1 "chmod 755 input"

So its quite basic, but not sure how get input into the script, and not sure about the structure either.

Any help would be greatly appreciated!

Cheers!
 
I am not a shell wiz, but simply substitute the string $1 for input should get you going.

#!/bin/sh
rcp -p $1 user@host1:$1
rsh -l user host1 "chmod 755 $1"


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top