- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: awk-o-phile question
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
Discussions
Discussions
Forums
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
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
тАО07-18-2008 07:31 AM
тАО07-18-2008 07:31 AM
awk-o-phile question
I have a need to create a script that parses the output of the cmviewcl command. I cannot seem to find a syntax that works. AIX's variant of the grep command has the the -p option that would let me do what I want to do, but HPUX does not support this option.
I want to parse the output of the cmviewcl command and extract the nodename on which a given package s running. The syntax will be something like: cmviewcl|awk '/$NODENAME/ { print $9 }'.
I know there are folx here who know exactly the proper syntax. It has been too long and many synapses joined my hairline in disappearing from the disappearing from this universe--my brain is just not what it used to be (if it ever was).
Chris
- Tags:
- awk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-18-2008 07:45 AM
тАО07-18-2008 07:45 AM
Re: awk-o-phile question
cmviewcl|awk '/'$NODENAME'/ { print $9 }'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-18-2008 07:48 AM
тАО07-18-2008 07:48 AM
Re: awk-o-phile question
# NODENAME=whatever
# cmview||awk -v NODENAME=$NODENAME '$0~NODENAME {print $9}'
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-18-2008 07:54 AM
тАО07-18-2008 07:54 AM
Re: awk-o-phile question
NODE STATUS STATE
Nodename1 up running
PACKAGE STATUS STATE AUTO_RUN NODE
Package1 up running enabled Nodename1
Package2 up running enabled Nodename1
Package3 up running enabled Nodename1
I want to pass Package1, Package2, Package3 etc into the commands to be executed in a while-do-done script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-18-2008 08:13 AM
тАО07-18-2008 08:13 AM
Re: awk-o-phile question
do
echo "$f1"
echo "$f2"
echo "$f3"
...
...
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-18-2008 08:24 AM
тАО07-18-2008 08:24 AM
Re: awk-o-phile question
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-18-2008 08:29 AM
тАО07-18-2008 08:29 AM
Re: awk-o-phile question
Much appreciated.