- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: awk scripting
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
03-16-2005 05:07 AM
03-16-2005 05:07 AM
ndd -h sup | grep tcp_ | awk '{print $1}' > ndd.input
which gave me a list of all supported tunables in ndd.input
I then want to run a script that puts the tunable name followed by a space, then the parameter setting like this:
...
tcp_xmit_lowater_lnf 16384
tcp_xmit_lowater_lnp 2048
...
so i can diff them.
I can use this command:
ndd -get /dev/tcp tcp_xmit_lowater_lnf
to get:
16384
here's the script I have:
awk '{print "echo " $0 "\nndd -get /dev/tcp " $0}' ndd.input | sh > ndd.out.$HOST
however, this outputs this form:
tcp_xmit_lowater_lnf
16384
tcp_xmit_lowater_lnp
2048
so when I diff them, it shows the difference in values, but not which parameters they are.
Any Ideas?
Thanks!
Josh
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2005 05:25 AM
03-16-2005 05:25 AM
Re: awk scripting
for p in `< ndd.input`
do
echo "$p \c"
ndd -get /dev/tcp $p
done
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2005 05:29 AM
- Tags:
- awk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2005 05:34 AM
03-16-2005 05:34 AM
Re: awk scripting
ndd -h sup | awk '/tcp_/ {
a="ndd -get /dev/tcp "$1 | getline value;
print $1, value;
}' > ndd.out.$HOST
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2005 05:37 AM
03-16-2005 05:37 AM
Re: awk scripting
Josh