This is a discussion on How to pass a parameter to a shell script within the Shell scripting forums, part of the Development/Scripting category; I have 2 scripts, ftp_file.sh and sendfile.sh ftp_file.sh ~~~~~~ #!/bin/bash sftp -b /home/<instance>/script/ftp/sendfile.sh oracle@<host> sendfile.sh ~~~~~~~ #!/bin/bash cd /u01/<destination_directory> put ...
|
|||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
|||
|
I have 2 scripts, ftp_file.sh and sendfile.sh
ftp_file.sh ~~~~~~ #!/bin/bash sftp -b /home/<instance>/script/ftp/sendfile.sh oracle@<host> sendfile.sh ~~~~~~~ #!/bin/bash cd /u01/<destination_directory> put /d01/<source_directory>/xxx.out xxx.out When i run ./ftp_file.sh the sendfile.sh is executed and the xxx.out file is transferred from the source_directory to the destination_directory. This works fine. The sendfile.sh is hardcoded with xxx.out. How can i pass a parameter to sendfile in order to transfer other files to the destination_directory instead of just xxx.out? I am new to shell scripting. regards flyingrat |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Increasing the KERNEL parameter | sathiya | Ubuntu / Debian | 4 | 02-01-2008 10:36 AM |
| writing a shell script to find out my shell name | jaymob123 | Shell scripting | 1 | 10-08-2007 12:36 AM |
| SED pass a output line to another | cillo | Shell scripting | 6 | 11-01-2006 01:59 PM |
| user pass word | sparky | Shell scripting | 1 | 06-26-2006 07:19 PM |
| How to pass shell variable to awk program | Shell scripting | 4 | 06-23-2006 05:11 AM | |