| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com> |
| List-Archive: | <http://sourceware.cygnus.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT sourceware DOT cygnus DOT com> |
| List-Help: | <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs> |
| Sender: | cygwin-owner AT sourceware DOT cygnus DOT com |
| Delivered-To: | mailing list cygwin AT sourceware DOT cygnus DOT com |
| Message-ID: | <38C5469C.25EC5495@veritas.com> |
| Date: | Tue, 07 Mar 2000 10:12:44 -0800 |
| From: | Bob McGowan <rmcgowan AT veritas DOT com> |
| Organization: | VERITAS Software |
| X-Mailer: | Mozilla 4.7 [en] (WinNT; U) |
| X-Accept-Language: | en |
| MIME-Version: | 1.0 |
| To: | Dan DOT Karipides AT trilogy DOT com |
| CC: | cygwin AT sourceware DOT cygnus DOT com |
| Subject: | Re: Executing .bat files from bash |
| References: | <OFEE0B2429 DOT 19D78C4A-ON0625689B DOT 005C1C9D AT trilogy DOT com> |
Dan DOT Karipides AT trilogy DOT com wrote:
>
> I've searched the archives for this and can only find very old articles
> that don't
> directly answer my question.
>
> I've noticed in the current b20.1 release, that I can run a bat file simply
> by
> typing it's name. I haven't seen the need to type "cmd /c <file>.bat",
> which
> was suggested in the older archived mail. All I need to type is <file>.bat
> and the bat file will execute. However, I'm wondering if I can set an
> environment variable or a registry key or something that will eliminate
> the need to type the ".bat" extension. Basically, .exe files don't need
> it,
> .sh files don't need it -- anyway that .bat can be made to not need the
> extension to execute? I'll even patch bash if I have to.
Dan,
I don't have a patch for bash but a suggestion that might help, assuming
that the batch files you use are "stable" (total number constant,
infrequent additions or deletions from the list) so maintenance would be
easier.
Create a series of aliases for your batch commands in the .bashrc file:
alias file=file.bat
alias file1=file1.bat
etc...
--
Bob McGowan
Staff Software Quality Engineer
VERITAS Software
rmcgowan AT veritas DOT com
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |