delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/02/20/00:12:02

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
Date: Sun, 20 Feb 2005 00:13:40 -0500
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Grep for tab character
Message-ID: <20050220051340.GA30669@trixie.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
References: <opsmhbyxl1ov81ve AT mail DOT optusnet DOT com DOT au>
Mime-Version: 1.0
In-Reply-To: <opsmhbyxl1ov81ve@mail.optusnet.com.au>
User-Agent: Mutt/1.4.1i

On Sun, Feb 20, 2005 at 03:55:35PM +1100, Robert Mark Bram wrote:
>I cannot seem to use grep for tabs. Here is what I have tried..
>
>And these lines show how I am trying to grep for tab, but with no luck!
>
>Robert Mark Bram - /tmp
>$grep -e [\\t]How test.txt
>
>Robert Mark Bram - /tmp
>$grep -e [\t]How test.txt
>
>Robert Mark Bram - /tmp
>$grep -e "[\t]How" test.txt
>
>Robert Mark Bram - /tmp
>$grep -e "[\\t]How" test.txt
>
>Robert Mark Bram - /tmp
>$
>
>Am I missig something? Or is it cygwin grep?

How about just using the actual tab character?  I don't see any indication that
grep is supposed to treat '\t' specially and it seems to behave that way on linux,
too.

What's wrong with just using tab?

cgf

--
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