#!/bin/tcsh -f #(ie run the tshell on this but don't read the .cshrc or .tcshrc) echo version = 1.03 of yvpgt 2011 Sep 04 # 2011 Sep 04, 1.03: update documentation # 2011 Mar 14, 1.02: why fail?? # 2010 Nov 26, 1.01: added detection for yvpg # 2010 Sep 14, 1.00: origin echo "usage: yvpgt" echo "Call yvpg with longest token as another search parameter." set delaygood = 10 # seconds to delay for good results set delaybad = 10 # seconds to delay for problems # say $delaygood $delaybad # buffer for testing yvp call: # 2006, 45, 6570 # Look for yvpg program if (0) then # debug locating yvpg which yvpg echo echo "env ---------------------" env echo echo "pwd ---------------------" pwd echo echo " path -------------------" echo "$path" echo echo "whoami ------------------" whoami echo endif if (`which yvpg| grep '/'|wc -l`> 0) then echo 'found the yvpg program' set yvpg = yvpg # say 'found the yvpg program' & else # Ok, it's being called as a 'button' on the desktop set me = `whoami` set foundyvpg = 0 if (-d ~/script) then if (-f ~/script/yvpg) then set yvpg = `ls ~/script/yvpg` set foundyvpg = 1 # say found yvpg else set foundyvpg = 0 endif else set foundyvpg = 0 endif if !($foundyvpg) then echo 'Could not find the yvpg program\!' say 'Could not find the yvpg program\!' echo 'yvpg should be in your script directory at' say 'yvpg should be in your script directory at' echo "~/script/yvpg" say "~/script/yvpg" sleep $delaybad exit else endif endif $yvpg - exit ********************************************************************************