Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!mailrus!uflorida!ukma!xanth!cs.odu.edu!Amiga-Request From: Amiga-Request@cs.odu.edu (Amiga Sources/Binaries Moderator) Newsgroups: comp.sources.amiga Subject: v90i035: which.rexx 1.2 - shell for C:Which that knows of WShell's global path, Part01/01 Message-ID: <11190@xanth.cs.odu.edu> Date: 1 Feb 90 02:35:15 GMT Sender: tadguy@cs.odu.edu Reply-To: Juergen Hermann Lines: 90 Approved: tadguy@cs.odu.edu (Tad Guy) X-Mail-Submissions-To: Amiga@cs.odu.edu Submitted-by: Juergen Hermann Posting-number: Volume 90, Issue 035 Archive-name: util/which.rx-1.2 #!/bin/sh # This is a shell archive. Remove anything before this line, then unpack # it by saving it into a file and typing "sh file". To overwrite existing # files, type "sh file -c". You can also feed this as standard input via # unshar, or by typing "sh 'which.rexx' <<'END_OF_FILE' X/* which.rexx X X A shell for C:Which that knows of WShell's global path X X $Author: jh $ X $Date: 90/01/30 23:13:34 $ X $Revision: 1.2 $ X $State: Exp $ X X $Log: which.rexx,v $ X Revision 1.2 90/01/30 23:13:34 jh X Check for the existance of a global path in ENV:Path X X Revision 1.1 90/01/30 21:07:48 jh X Initial revision X X*/ X XFailAt 30 X XParse Arg args X Xif ~ Exists('ENV:Path') then do X "C:Which" args X exit X end X X"Path Show | ExecIO From 2 Stem oldpath." Xlocalpath = '' Xdo i = 1 to oldpath.0 - 1 X localpath = localpath' 'oldpath.i X end X X"ExecIO Read ENV:Path For 1 Var globalpath" X X"Path Add" globalpath X"C:Which" args X X"Path Reset" X"Path Add" localpath END_OF_FILE if test 685 -ne `wc -c <'which.rexx'`; then echo shar: \"'which.rexx'\" unpacked with wrong size! fi # end of 'which.rexx' fi echo shar: End of archive 1 \(of 1\). cp /dev/null ark1isdone MISSING="" for I in 1 ; do if test ! -f ark${I}isdone ; then MISSING="${MISSING} ${I}" fi done if test "${MISSING}" = "" ; then echo You have the archive. rm -f ark[1-9]isdone else echo You still need to unpack the following archives: echo " " ${MISSING} fi ## End of shell archive. exit 0 -- Submissions to comp.sources.amiga and comp.binaries.amiga should be sent to: amiga@cs.odu.edu or amiga@xanth.cs.odu.edu ( obsolescent mailers may need this address ) or ...!uunet!xanth!amiga ( very obsolescent mailers need this address ) Comments, questions, and suggestions s should be addressed to ``amiga-request'' (only use ``amiga'' for submissions) at the above addresses.