Sending quotes to rsh
Gary Mills
mills at ccu.umanitoba.ca
Fri Jul 27 06:26:45 AEST 1990
Is this the best way to quote the remote arguements to rsh? It works,
but seems a bit complicated. This is SunOs 4.0.3.
---------------8<---------------------8<----------------------
#!/bin/sh
# usage: mailer [-f from] address address ...
#
O="-f MAILER-DAEMON"
S=other_host
case $1 in
-f) O="-f '$2'";shift 2;;
esac
R="$O"
for A in "$@"
do
R="$R '$A'"
done
rsh $S echo "$R"
##
--
-Gary Mills- -University of Manitoba- -Winnipeg-
More information about the Comp.unix.questions
mailing list