This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
RE: run batch w/o .bat?
- From: "Barnhart, Kevin" <Kevin dot Barnhart at echostar dot com>
- To: 'Jon LaBadie' <jcyg at jgcomp dot com>, "'cygwin at cygwin dot com'" <cygwin at cygwin dot com>
- Date: Wed, 5 Jun 2002 08:16:43 -0600
- Subject: RE: run batch w/o .bat?
Yes, I could see how that might be a problem. But aren't the commands that
I type in an open shell only available in that shell? I.e. if I have two
bash windows open, and I type a command in one, then I can't access it
(using !! or otherwise) from the other--or at least I haven't been able to.
That aside, isn't there a way to use the 'fc' command to grab the last
command from the history and then edit it?
> -----Original Message-----
> From: Jon LaBadie [SMTP:jcyg@jgcomp.com]
> Sent: Wednesday, June 05, 2002 8:10 AM
> To: Barnhart, Kevin
> Subject: Re: run batch w/o .bat?
>
> On Wed, Jun 05, 2002 at 07:01:21AM -0600, Barnhart, Kevin wrote:
> > Yeah, I ran into the fact that you can't use bash history commands in
> shell
> > scripts while searching through the bash docs yesterday :( I found a
> number
> > of different ways to do what you have done below, but isn't there some
> way
> > that I can recall the last history command inside of the shell
> script??!!
> >
>
> Cmd history generally only tracks interactive session cmds.
> I know you are dealing with a special case, interactive,
> the script is the next cmd. But for a generic shell script,
> how could it tell which cmd to go back to? Some interactive
> session (you can have multiple sessions going on) might
> have put more cmds into the history file.
>
> --
> Jon H. LaBadie jcyg@jgcomp.com
> JG Computing
> 4455 Province Line Road (609) 252-0159
> Princeton, NJ 08540-4322 (609) 683-7220 (fax)
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/