#!/bin/sh -f
#
# copies arguments to NThost and starts up Excel on them
#
# usage: wncexcel NThost files...

excelpath="c:\\msoffice\\excel\\excel"
destdir=tmp

if [ $# -lt 2 ]; then
    echo Usage: `expr //$0 : '.*/\(.*\)'` 'NT-hostname file ...'
    exit 1
fi

hostname=$1
shift

if [ `wncwait $hostname` ]; then
    exit 1
fi

rcp $* $hostname:$destdir
rsh $hostname $excelpath $destdir\\`basename $1` &

