sed and rsh

sed and rsh

Post by star nig » Fri, 27 Jul 2001 22:37:42



is there any known isses with using sed with rsh

sed -n '/^ passwd:/p' /etc/nsswitch.conf works ok locally but gives a
command garbled when
rsh  host  sed -n '/^ passwd:/p' /etc/nsswitch.conf
any ideas.

Thanks
SN

 
 
 

sed and rsh

Post by t.. » Fri, 27 Jul 2001 22:57:40



> is there any known isses with using sed with rsh

> sed -n '/^ passwd:/p' /etc/nsswitch.conf works ok locally but gives a
> command garbled when
> rsh  host  sed -n '/^ passwd:/p' /etc/nsswitch.conf

rsh eats away the quotes so the remote system sees
sed -n /^ passwd:/p /etc/nsswitch.conf

The solution is adding an extra pair of quotes, e.g.,

rsh  host  "sed -n '/^ passwd:/p' /etc/nsswitch.conf"

--
Tapani Tarvainen