Passing variables to the scripts
How can we use variables ie. $1, $2 etc within a script and then pass them at invocation.
For example I create a script which need to Put 3 files to the Open SSH server. I would like to invoke a common script with a stored session and pass the filenames in the command line.
Example:
winscp3 abc@example.com /script=ex.txt file1 file2 file3
Within the script I would use
put $1
put $2
put $3
where $1 = file1 etc.
Any ideas anybody?
For example I create a script which need to Put 3 files to the Open SSH server. I would like to invoke a common script with a stored session and pass the filenames in the command line.
Example:
winscp3 abc@example.com /script=ex.txt file1 file2 file3
Within the script I would use
put $1
put $2
put $3
where $1 = file1 etc.
Any ideas anybody?