X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Tzuriel Subject: Using grep from within a .cmd or .bat file in Windows Date: Tue, 31 Jan 2006 15:53:55 +0000 (UTC) Lines: 28 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes 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 Hi, You folks were so helpful with my first question, I hope you can help me now also! I am writing a .cmd script in Windows (same behavior in XP and Server 2003) and instead of grep executing the search, it is just printing to standard input the command in the .cmd. For example the lines: grep --help pause inside a file called grep.cmd, results in the line "grep --help" printing infinitely to the command window instead of the help text being displayed. Any variation of this results in the same thing. Whenever grep is used, it just prints the text following the grep infinitely to the command window. What do I need to add to the script to get this to act like it would if I typed it in the command window manually? Thank you! Tzuriel -- 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/