X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.0 required=5.0 tests=BAYES_20 X-Spam-Check-By: sourceware.org From: Roy Jensen To: cygwin AT cygwin DOT com Subject: grep and the -f switch Date: Mon, 26 Nov 2012 12:08:54 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Get-Message-Sender-Via: cs2.uhcloud.com: authenticated_id: r DOT jensen AT consol DOT ca Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: 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 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id qAQJ9GZj014275 I've created a text file (in Windows) with the text patterns I wish to search for. Using the -f switch, grep only searches for the last pattern in the file. If there is a blank line at the end, grep finds nothing. grep -a -A 4 -f pattern.txt my.file > output.txt Any suggestions to get this to work? Thanks, Roy Jensen Roy Jensen -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- *** Imagination is more important than knowledge. (Einstein) =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple