- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Script help
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
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
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
06-27-2011 05:11 PM - edited 06-27-2011 05:12 PM
06-27-2011 05:11 PM - edited 06-27-2011 05:12 PM
Script help
I have following piece of code which generates a config file.
I am in need of running nslookup or host or dig to get the IP address of the VIP. Basically once I get IP address from nslookup or host I want to use that in check_vip commad
check_vip -I IP-address -p $port -u URI -t 5 instead of "echo "command_line \$USER1\$/check_vip -H $host -p $port -u URI -t 5""
/usr/bin/curl http://VIP:9000/list | grep VIP |awk '{print $1,$3}'|/usr/bin/perl -lne 'm{"(.*?)".*?//(.*):(\d+)/} and print "$2 $3"'|sort -u -k3,3|while read host port do echo "define command{" echo "command_name check_vip_env1_$port" echo "command_line \$USER1\$/check_vip -H $host -p $port -u URI -t 5" echo "}" done > $file1
Thanks,
Allan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2011 02:07 AM
06-28-2011 02:07 AM
Re: Script help
host=$(nslookup packagename | awk '/Address/{ print $2}')