- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- command in script - parameters
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
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
Community
Resources
Forums
Blogs
- 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
04-19-2005 02:15 AM
04-19-2005 02:15 AM
TEST='*blinker@yahoo.com'
I need to send like parameters to another command(inyec) , the name user and domain without @
ex command manually:
inyec -l reinstall -u "*binker" -d "yahoo.com"
since I can do it in my script.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2005 02:21 AM
04-19-2005 02:21 AM
Re: command in script - parameters
echo "${TEST}" | awk -F '@' '{print $1,$2}' | read NAME DOM
inyec -l reinstall -u "${NAME}" -d "${DOM}"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2005 02:29 AM
04-19-2005 02:29 AM
Re: command in script - parameters
echo "${TEST}" | tr '@' ' ' | read NAME DOM
inyec -l reinstall -u "${NAME}" -d "${DOM}"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2005 02:36 AM
04-19-2005 02:36 AM
Re: command in script - parameters
echo "${TEST}" | awk -F '@' '{print $1,$2}' | read NAME DOM
awk: syntax error near line 1
awk: bailing out near line 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2005 02:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2005 02:42 AM
04-19-2005 02:42 AM
Re: command in script - parameters
have attached shell script that test first two answers.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2005 02:43 AM
04-19-2005 02:43 AM
Re: command in script - parameters
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2005 02:51 AM
04-19-2005 02:51 AM
Re: command in script - parameters
USING set -x in the script obtaing:
ANWS1:
++ echo '*jairo@speedy.com.ar'
++ awk -F '@{print $1,$2}'
++ NAME DOM
awk: ./TESTO.sh: NAME: command not found
syntax error near line 1
awk: bailing out near line 1
++ inyec -l reinstall -u '' -d ''
ANWS2:
echo '*jairo@speedy.com.ar'
++ tr @ ' '
++ read NAME DOM
++ inyec -l reinstall -u '' -d ''
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2005 02:58 AM
04-19-2005 02:58 AM
Re: command in script - parameters
echo "${TEST}" | awk -F '@' '{print $1,$2}' | read NAME DOM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2005 03:03 AM
04-19-2005 03:03 AM
Re: command in script - parameters
ITS work:
`echo "$TEST" | sed -e 's/^/-u "/' -e 's/@/" -d "/' -e 's/$/"/'`
THANKS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2005 03:52 AM
04-19-2005 03:52 AM
Re: command in script - parameters
just as a thought why the first two options do not work for you, but work on my platform.
What OS are you running?
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2005 06:36 AM
04-19-2005 06:36 AM
Re: command in script - parameters
In hpux too work ANSW1 Y ANSW2
SUBMITED POINT for Klay and Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-19-2005 07:18 AM
04-19-2005 07:18 AM