Created
February 3, 2012 13:12
-
-
Save Kagee/1730122 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
manager:~/scripts# cat foreach_host.sh | |
for hostname in $(cat /etc/hosts | awk '{print $NF}'); do echo "Working on hostname: $hostname"; $1; done; | |
manager:~/scripts# ./foreach_host.sh 'nc $hostname 4949' | |
Working on hostname: manager | |
$hostname: forward host lookup failed: Unknown host |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment