bowei_99 has asked for the wisdom of the Perl Monks concerning the following question:
This runs and *seems* successful by using normal rsh, but actually changes nothing. Note that it failed using the first two authentication methods, but is OK the last time. This is consistent with other commands with rsh that work.
#/usr/kerberos/bin/rsh remote-host /usr/bin/perl -p -i -e 's/^#\s+NETDUMPADDR=/#\+NETDUMPADDR=\nNETDUMPADDR=ip-address-here\n/g' + /etc/sysconfig/netdump connect to address ip-address-here: Connection refused Trying krb4 rsh... connect to address ip-address-here: Connection refused trying normal rsh (/usr/bin/rsh) #
even though this works, i.e. actually replaces text, on the local system:
#/usr/bin/perl -p -i -e 's/^# NETDUMPADDR=/# NETDUMPADDR=\nNETDUMPADDR +=ip-address-here\n/g' netdump
I suppose I could rcp from the remote host to the local host, change it, then copy it back, but that seems kinda kludgey. Anybody know what I'm missing here?
-- Burvil
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Search and replace on remote system using rsh
by Argel (Prior) on May 18, 2006 at 00:43 UTC | |
Re: Search and replace on remote system using rsh
by graff (Chancellor) on May 18, 2006 at 04:04 UTC | |
Re: Search and replace on remote system using rsh
by jesuashok (Curate) on May 18, 2006 at 03:41 UTC |