Carlo Florendo
Tue Nov 20 10:51:00 GMT 2007

123cu wrote:
> First, I am a newbee to Cygwin so please excuse my lack of knowledge.
> I have a text file (aaa.txt) which contains a simple grep command. When I
> start Cygwin.bat, I want this file to be started (executed) as part of
> invoking the cygwin.bat file. I don't know how to do it. Any help will be
> appreciated.
> cygwin.bat file
> @echo on
> C:
> chdir C:\cygwin\bin
> set HOME=\cygwin
> bash --login -i

I could give you two ways to do that:

1) You simply have to edit /etc/bash.bashrc then add the line that executes 
aaa.txt.  For example, if, as you say, your file aaa.txt is in "c:\temp 
dir" and contains a *simple* grep command, then the line on the 
/etc/bash.bashrc file would look like this:

`cat /cygdrive/c/temp\ dir/aaa.txt`

Note the backticks at the start and end of the line and note that the 
directory appears as:

"temp\ dir"

and not

"temp dir"

2) You could actually put the entire grep command on /etc/bash.bashrc if 
you wish.

Thank you very much!

Best Regards,


Carlo Florendo
Music Research and Development Division
Astra Philippines Inc.
UP-Ayala Technopark, UP Campus Diliman
1101 Quezon City, Philippines

The Astra Group of Companies
5-3-11 Sekido, Tama City
Tokyo 206-0011, Japan

Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list