HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Shell Wrapper
Operating System - HP-UX
1830898
Members
2731
Online
110017
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
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
03-30-2006 07:49 AM
03-30-2006 07:49 AM
Shell Wrapper
I have this tuxedo qmadmin ( similar to sqlplus )command which opens up a session to clear the tuxedo queues.As most the reps here do not know tuxedo,I need to create a shell wrapper for them to execute.
Here is the wrapper I am trying to create:
-----------------------------------------------
#!/usr/bin/ksh
. /aqq/dolid/test/cur/admin/tux/.profile
cat ubbsource |grep OPEN|grep "/appl/solid"|grep -v "/tux"
echo "Select Queue Name and Path"
read resp1
qmadmin $resp1
!echo "Open the queue space using the name from above"
!read resp2 #this is where its not working ..how to make it read the response #once inside the qmadmin
qopen $resp2
!echo "Doing qinfo now, look for all ErrHold Queues"
qinfo
q
!
----------------------------------------------
Here is the wrapper I am trying to create:
-----------------------------------------------
#!/usr/bin/ksh
. /aqq/dolid/test/cur/admin/tux/.profile
cat ubbsource |grep OPEN|grep "/appl/solid"|grep -v "/tux"
echo "Select Queue Name and Path"
read resp1
qmadmin $resp1
!echo "Open the queue space using the name from above"
!read resp2 #this is where its not working ..how to make it read the response #once inside the qmadmin
qopen $resp2
!echo "Doing qinfo now, look for all ErrHold Queues"
qinfo
q
!
----------------------------------------------
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2006 09:01 PM
03-30-2006 09:01 PM
Re: Shell Wrapper
Hi,
it is hard to check what you really wont - so I try to guess:
- qmadmin reads tuxedo commands from stdin
...
read resp1
qmadmin $resp1 < cmd1
cmd2
EOF
The resulting output will be in $resp2, and you can analyze this output to get further information, e.g.
myinfo=$(print "$resp2" | awk ...)
qmadmin $resp1 < cmd3 $myinfo
cmd4 $resp1
EOF
mfG Peter
it is hard to check what you really wont - so I try to guess:
- qmadmin reads tuxedo commands from stdin
...
read resp1
qmadmin $resp1 <
cmd2
EOF
The resulting output will be in $resp2, and you can analyze this output to get further information, e.g.
myinfo=$(print "$resp2" | awk ...)
qmadmin $resp1 <
cmd4 $resp1
EOF
mfG Peter
The Universe is a pretty big place,
it's bigger than anything anyone has ever dreamed of before.
So if it's just us, seems like an awful waste of space, right?
Jodie Foster in "Contact"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2006 09:07 PM
03-30-2006 09:07 PM
Re: Shell Wrapper
Two ways to do it.
echo "your_choice1 your_choice2" | qmadmin
(Depends on qmadmin command. It may work or may not)
Otherwise use here document.
qmadmin first_arg << END
command1
command2
END
echo "your_choice1 your_choice2" | qmadmin
(Depends on qmadmin command. It may work or may not)
Otherwise use here document.
qmadmin first_arg << END
command1
command2
END
There is no substitute to HARDWORK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2006 11:57 PM
03-30-2006 11:57 PM
Re: Shell Wrapper
Hunki,
What are you expecting the user to do after
!echo "Open the queue space using the name from above" ???
Are you expecting the user to run some command ?? If yes cant you yourself run the command in the script as the user has alerady provided the queue name as alerady suggested by others.
qmadmin $resp1 <> logfile
qopen $resp1
!echo "Doing qinfo now, look for all ErrHold Queues"
qinfo
q
!
EOF
Hope this helps,
Ninad
What are you expecting the user to do after
!echo "Open the queue space using the name from above" ???
Are you expecting the user to run some command ?? If yes cant you yourself run the command in the script as the user has alerady provided the queue name as alerady suggested by others.
qmadmin $resp1 <
qopen $resp1
!echo "Doing qinfo now, look for all ErrHold Queues"
qinfo
q
!
EOF
Hope this helps,
Ninad
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 2025 Hewlett Packard Enterprise Development LP