#!/bin/sh # RemoteDesktop.sh # Chieh Cheng # 2007-12-03 # http://www.CynosureX.com/ # GNU General Public License (GPL) Version 2, June 1991 scriptName=`echo $0 | sed s/\\\\/.*\\\\///g` if [ $# -ne 1 ] then echo " Usage: $scriptName \"alias\"" else alias="$1" scriptPath=`dirname $0` dataFile="${scriptPath}/RemoteDesktop.txt" if [ -f "${dataFile}" ] then data=`grep "${alias}|" "${dataFile}"` if [ "${data}" = "" ] then echo "Alias '${alias}' does not exist in configuration file." else host=`echo "${data}" | cut -d "|" -f 2` flag=`echo "${data}" | cut -d "|" -f 3` rdesktop ${flag} "${host}" & fi else echo "${dataFile} not found. Cannot proceed with connection." fi fi