delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/01/31/11:02:44

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Tzuriel <tzuriel DOT kastel AT med DOT ge DOT com>
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: <loom.20060131T164649-334@post.gmane.org>
Mime-Version: 1.0
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: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019