Most Popular in Unix
-
swapon: Function not implemented
-
then: then/endif not found
-
How do I configure sendmail to block all OUTGOING mail FROM one userid TO the world?
-
Find a special string in a text document
-
TSPY_ZBOT.AZL
-
3004-505 Cannot set process environment
-
Use Z-Shell for loop to Compact Argument List
-
Sun GDD - Pkgapp v 3.3 SuSE Linux
-
Create Tarballs Greater Than 2GB
-
Help me using sed
Use Z-Shell for loop to Compact Argument List
Article posted from
My SysAd Blog (http://www.mysysad.com/2008/12/use-z-shell-for-loop-to-compact.html)
The other day I pinged a number of remote workstations to observe Round Trip Times (RTT) but forgot to eliminate a few series of contiguously numbered remotes that were known to be powered-off. Needless to say, the pinging effort was taking longer than it should have -- I promptly aborted the effort. Here is an example of a compact way of performing this common task using a Z-Shell for loop.
# zsh
# for blog in {1..5} {7..13} {15..22} {27..37}
for> ping -s mysysad$blog 1024 5
# zsh
# for blog in {1..5} {7..13} {15..22} {27..37}
for> ping -s mysysad$blog 1024 5
More Stories in My SysAd Blog
- Issues With an Orphaned .attribute^ File
- ftpconfig - Setup Anonymous FTP
- No Space Left on Device!
- Troubleshooting Domain Issues with My SysAd Blog - Again
- 142857 is an Interesting Number
- Pipe Symbols are Missing from Some Posts
- Field 'user_website' doesn't have a default value
- Determine Java Runtime Environment Version
- Access a Tape Drive Device From a non-global Zone
- Disable On-screen Keyboard on Startup
Most Popular Stories
A Hands On Look at Safari 4's (Crashy) Eye Candy
iPhone OS 4.0 may finally bring multitasking nirvana
[$] 4K-sector drives and Linux
Yet Another Blurry and Fake iPhone 3G Summer 2009 Image (It's Iron Bar Time!)
iPhone still second-place US smartphone while Android grows
Possibly loose DVI or tight VGA?
ModulR Case Liberates Your iPad From Your Lap [Cases]
Apple Building Out eBook Categories Ahead of iPad Launch as Developers Update Apps
The Litany of iPad Resistance [Apple]
Apple sees 98% iPhone growth as Microsoft, Google prepare for battle