Sysadmin Blog
Linux notes
Monday, May 12, 2014
Bash "for loop"
How to ping multiple selected servers in selected multiple racks.
for rack in 1 3 4 6 9 {14..27}; do echo $rack; for server in {46..48}; do fping "serv"$server"rack"$rack |grep unreachable |tee -a /tmp/down; done; done
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment