Mail Archives: djgpp/2008/09/04/21:01:32
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f
|
From: | CBFalconer <cbfalconer AT yahoo DOT com>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: ANNOUNCE: DJGPP port of GNU Which 2.20 uploaded.
|
Date: | Thu, 04 Sep 2008 20:50:59 -0400
|
Organization: | Ched Research http://cbfalconer.home.att.net
|
Lines: | 72
|
Message-ID: | <48C08273.2D1EC6B5@yahoo.com>
|
References: | <200808311516 DOT m7VFGE0Y026994 AT delorie DOT com>
|
Mime-Version: | 1.0
|
X-Trace: | feeder.motzarella.org U2FsdGVkX19kCDwBpIzOGtUoY3V/qwXWZeiyA6fQdq/fEUZTznJ1jsFrgTWgBKldRsn9XV4R6CsFOfKQovk7//DkAwnl9TItPxswEX1S2FXOOBg4WOLDLnzbdCw9+pxG1yVmtZIcHbesp5Ydhbr55g==
|
X-Complaints-To: | Please send complaints to abuse AT motzarella DOT org with full headers
|
NNTP-Posting-Date: | Fri, 5 Sep 2008 00:50:57 +0000 (UTC)
|
X-Mailer: | Mozilla 4.75 [en] (Win98; U)
|
X-Accept-Language: | en
|
X-Auth-Sender: | U2FsdGVkX1+F3bodhG07sx2zwBoy8rvYT56HjdajoQTlt8gDn2u2Mw==
|
Cancel-Lock: | sha1:+EYIxK8aasv/WG4NyqdUluzqFHw=
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
Juan Manuel Guerrero wrote:
>
> This is a port of GNU Which 2.20 to MSDOS/DJGPP.
>
> DJGPP specific changes.
> =======================
>
> The DJGPP port of Which will search for a program name given as argument to
> the program, and if it can not find it, it will add the well known DOS exten-
> sions to the given program name and starts again the search along the path.
> The known build-in DOS extensions are the four extensions known by the DJGPP
> port of bash 2.05b, these are ".exe", ".com", ".bat", ".btm". If a program
> e.g.: "foobar" can not be found on the path then Which will also search for
> "foobar.exe", "foobar.com", etc. along the path. The list of DOS extensions
> can be extended by setting the environment variable WHICH to a list of exten-
> sions separated by blanks, commas or semi colons.
I have used the following for 10 or so years:
[1] c:\>which which
"X:\"
which.btm Dec 31 2000 215 "which.btm"
1 item found: 1 file, 0 directories.
Total of file sizes: 215 bytes 0.21 K
[1] c:\>type x:\which.btm
@echo off
if ".%1." == ".." goto help
alias | grep -r "^%1=" ^ *locate %1 /t /l /x
goto end
:help
echo USAGE which command
echo shows where command is to be found on the path or as an
alias
:end
Locate is from Charles Dye:
[1] c:\>locate /?
LOCATE.COM v1.30 09-08-2002 C. Dye raster AT highfiber DOT com
Freeware. Copyright 1995-2002, Charles Dye. No warranty!
Syntax: LOCATE [filespec] [switches]
/H Hidden or system /D- find files, not Directories
/X .COM, .EXE, .BAT /D+ find Directories only
/Fn only First n items /D find both (default)
/A check Attributes /T path search
/0 0-byte files /R local hard drives only
/G Go to directory /K Kill (delete) items
/N bare Naked display /W Wide display
/S Summary info only /P Peter-style display
/L Win95 Long filenames /NP No Paging
/B:"command" Batch output /D:[start][,end] Date range
/O:"string" macro Output /T:[start][,end] Time range
/C:"string" run Commands /S:[small][,big] Size range
Space between the filespec and any switches. Output will be paged
unless it is redirected or /NP used. Specify default switches in a
LOCATE= variable. Try /D? /T? /S? /A? /B? or /O? for more help.
--
[mail]: Chuck F (cbfalconer at maineline dot net)
[page]: <http://cbfalconer.home.att.net>
Try the download section.
- Raw text -