This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Running a command on cygwin launch

<>. Reformatted.

Wynfield Henman wrote:
On 10/26/06, Larry Hall (Cygwin) <reply-to-list-only-lh <AT> cygwin <DOT> com> wrote:
<>.  Don't feed the spammers.

Ben LeBar wrote:
> Hi,
> I was wondering if there was any way to run a command on cygwin either
> through a batch file while launching cygwin or once launched.
> I heard that I could use a .batchrc file to do this, so I created one
> containing the command I wanted executed and put it in my home
> directory - it didn't work. Next I checked the Cygwin FAQ's and it
> said that a home directory may not have been set so put it in the
> cygwin root. I did this and tried it again -- no dice.
> If anyone could help me out or give me any alternatives I'd greatly
> appreciate it. Thanks.

If you're running Cygwin's bash prompt via cygwin.bat, you can add whatever "batch" commands you want to that. If you're looking to add some shell commands, you can do so in your .bash_login or .bashrc file, depending on your intent. See 'man bash' for details.

> Larry,
>  at the prompt type:   echo $HOME
> then put the BASH comnmands you want to be executed in the
> $HOME/.bash_profile   file.  If there isn't one, make one ( a plain
> text file with /n line endings).
> Normally this is were you set enviroment variables, etc.
> Cheers.

Actually, I think we were both a little late answering this one, since it
was already answered even by the time that I responded.  You responded to
my response. ;-)  I think you wanted to address Ben.

Larry Hall                    
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]