Most Popular in Unix
-
This forum's font looks bad on my new installation
-
Scripting Issue
-
need to know if there are ftp connections in my machine
-
Help a user logon in SUN SOLARIS 10 ?
-
cut words based on the word count of a line
-
How to check if my AIX server has Dual HBA's?
-
Installing bash on AIX 6.1
-
AIX KSH: 0403-029 There is not enough memory available now
-
EvE Online IGB - PHPBB Interface: PHPBB3 Interface Beta 1
-
awk multiple-line search and replace one-liner
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
- How to Exclude a Directory for TAR
- Restore MySQL Database via Command Line
- Sun StorageTek 6140 Cache
- HTML Symbol Entities issue on Blogger
- Log an FTP Session with a Filter
- The Khan Academy is Teaching the Online World
- Use Redirect Symbol to Zero File
- Run the Windows Explorer GUI
- Retrieve Information on LDAP User
- $HOME/.TTauthority not writable, auth entry not added
Most Popular Stories
Localized Flipboard Content guides available for UK, Ireland, Australia and Canada
A fix for those "Pairing Record Missing" errors
You're the Pundit: iPad 3
Apple removes standard Mac OS X 10.7.3 download due to bugs, offers combined download instead
MPAA Sues LimeWire Back From The Dead
This forum's font looks bad on my new installation
Scripting Issue
need to know if there are ftp connections in my machine
AirServer Lets You Push Airplay Audio To Your Apple Computer [Video]
Dev Juice: How do I autocomplete in Xcode 4?