Add parameter
I have a ftp script "script1" like this
#vi script1 ftp ip <<EOF lcd dir1 cd dir2 put ${1} ! script2 bye EOF then I run it as #script1 myfile then it could ftp myfile to remote site , it works fine , that mean ${1} is the parameter In the script1 , it will run another script ( script2) , now I would like this scripts also use the parameter , for example , I would like to display the parameter of ${1} like below , what can i do ? I tried to edit script2 as below #vi script2 echo ${1} what I expect the result is myfile , but it didn't , can advise what can i do ? thx |
I am not sure I understand you correctly, but nonetheless, if you call script2 from within script1, you need to pass it the argument, just like you pass it to script1.
Code:
#this is inside script1 |
Quote:
what is screen2 ? is a command ? thx |
Quote:
|
All times are GMT -5. The time now is 03:34 PM. |