J
jdoe987
This may sound like a simple question - but I am a newbie at perl.
Most of my scripting is in sh. Anyway - I am having problems with the
command below. specifically in the perl command.
for HOST in `ypcat netgroup| grep foobar;; do ping $HOST 2 >> /dev/
null; if [ $? -eq 0 ]; then perl -e 'alarm(3); exec qw/rsh -n \{$HOST}
\ uname -a /'; fi;done
The $HOST variable is only being expanded on the first host. After
that it loops stating:
{$HOST}: unknown host
Any help and an explanation on what the correct syntax is would be
appreciated.
Most of my scripting is in sh. Anyway - I am having problems with the
command below. specifically in the perl command.
for HOST in `ypcat netgroup| grep foobar;; do ping $HOST 2 >> /dev/
null; if [ $? -eq 0 ]; then perl -e 'alarm(3); exec qw/rsh -n \{$HOST}
\ uname -a /'; fi;done
The $HOST variable is only being expanded on the first host. After
that it loops stating:
{$HOST}: unknown host
Any help and an explanation on what the correct syntax is would be
appreciated.