bug-grep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #23535] Grep Doesn't Support \t as a tab character


From: Benno Schulenberg
Subject: [bug #23535] Grep Doesn't Support \t as a tab character
Date: Wed, 11 Jun 2008 20:37:44 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.14) Gecko/20080420 Firefox/2.0.0.14

Follow-up Comment #1, bug #23535 (project grep):

It is not entirely clear how exactly you are searching for tabs.  It would
have been better to provide actual examples, pasting them together with their
output.  For example:

$ echo -e "t : words" | grep 't'
$ echo -e "t : words" | grep $'t'
         : words
$ echo -e "t : words" | sed 's/t/xx/'
xx : words

In 'info sed' there is this:

`CHAR' [...]
    Note that the only C-like backslash sequences that you
    can portably assume to be interpreted are `n' and `\';
    in particular `t' is not portable, and matches a `t'
    under most implementations of `sed', rather than a tab
    character.

Nowhere in 'info grep' I see mention of "t", so grep's regular expressions
apparently do not support it -- possibly to avoid problems when porting
scripts.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?23535>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]