GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Add parameter
Operating System - HP-UX
1846594
Members
2431
Online
110256
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2008 12:46 AM
09-09-2008 12:46 AM
Add parameter
I have a ftp script "script1" like this
#vi script1
ftp ip < 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
#vi script1
ftp ip <
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
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2008 12:53 AM
09-09-2008 12:53 AM
Re: Add parameter
Hi,
You need to pass the $1 to the script you're trying to run.
The $1, $2, etc are the arguments to the script.
So, if you change your script to use
! script ${1}
instead of
! script
it should work.
You need to pass the $1 to the script you're trying to run.
The $1, $2, etc are the arguments to the script.
So, if you change your script to use
! script ${1}
instead of
! script
it should work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2008 02:04 AM
09-09-2008 02:04 AM
Re: Add parameter
thx all
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP