5 if [ $# -lt 2 -o $# -gt 3 ]
8 'usage: grab-account <localuser> <shorthostname> [<remoteuser>]
9 creates an entry in /etc/sync-accounts, and runs sync-accounts
10 $Id: grab-account,v 1.2 1999-01-03 02:56:07 ian Exp $'
26 if perl -ne 'exit 1 if m/^\s*user\s+'$lu'\s/;' <$cf
29 next unless m/^\s*host\s+'$sh'\s*$/...m/^host|^end/;
30 next unless m/^\s*addhere\s*$/;
32 print "user '$lu'".("'$lu'" eq "'$ru'" ? "" : " remote='$ru'")."\n"
35 print(STDERR "\`addhere'\'' line not found\n"), $?=1 if !$? && !$done;
40 echo "entry already exists in $cf, leaving alone"