Most Popular in Unix
-
netstat showing lots of errors
-
picking file from a particular URL and the processing
-
A Tale of Two Moderation Models
-
how to write a shellscript to send a mail alert to the website user based on license expiration time
-
Homemade activity monitor-ish
-
Thank God Even Shopping Is Social Nowadays
-
phpBB Rivals 1.8.1 (Default branch)
-
What is the number of the masked code ee@ ?
-
problem with printf in shell script
-
VMDB Failure" followed by "Unable to open snapshot file"
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
Billboard nominates music app awards
Apple releases preview 3 of Xcode 4
Facebook Blocked Ping's API Access Because Apple Didn't Have Authorization To Use It [Unconfirmed]
netstat showing lots of errors
A Simple Way to Attach Your iPad to Your Walls [Ipad]
iOS 4.1 Gold Master Now Available To iPhone Developers [Apple]
Postage Stamps Go High-Tech With QR Code-Like Stamp Readable by Apps [IPhone Apps]
Walkman Outsold iPod in Japan During August [Apple]
Confusion Over Facebook's Brief Appearance in Ping for iTunes
picking file from a particular URL and the processing