Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: From: "Barnhart, Kevin" To: "'Jon LaBadie'" , "'cygwin AT cygwin DOT com'" Subject: RE: run batch w/o .bat? Date: Wed, 5 Jun 2002 08:16:43 -0600 MIME-Version: 1.0 Content-Type: text/plain 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 AT jgcomp DOT 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 AT jgcomp DOT 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/