From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10794 invoked by alias); 20 Nov 2007 06:37:29 -0000 Received: (qmail 10778 invoked by uid 22791); 20 Nov 2007 06:37:28 -0000 X-Spam-Check-By: sourceware.org Received: from Unknown (HELO mx1.hq.astra.ph) (202.78.101.198) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 20 Nov 2007 06:37:26 +0000 Received: from [192.168.10.32] (thorin.hq1.astra.ph [192.168.10.32]) by mx1.hq.astra.ph (Postfix) with ESMTP id EAADE1FA4A for ; Tue, 20 Nov 2007 14:37:19 +0800 (PHT) Message-ID: <47428046.9010208@gmail.com> Date: Tue, 20 Nov 2007 10:51:00 -0000 From: Carlo Florendo User-Agent: Thunderbird 1.5.0.13 (Windows/20070809) MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: cygwin.bat References: <13839178.post@talk.nabble.com> In-Reply-To: <13839178.post@talk.nabble.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2007-11/txt/msg00369.txt.bz2 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 -- Carlo Florendo Music Research and Development Division Astra Philippines Inc. UP-Ayala Technopark, UP Campus Diliman 1101 Quezon City, Philippines http://www.astra.ph -- The Astra Group of Companies 5-3-11 Sekido, Tama City Tokyo 206-0011, Japan http://www.astra.co.jp -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/