Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.utils.bug > #2208

Re: Just want to exclude lines with tabs

From John Cowan <cowan@mercury.ccil.org>
Newsgroups gnu.utils.bug
Subject Re: Just want to exclude lines with tabs
Date 2016-05-19 10:56 -0400
Message-ID <mailman.159.1463669817.6543.bug-gnu-utils@gnu.org> (permalink)
References <CAAY=KgOd0CYkx43xZ7WQ1SFj3mABziKEiueN6JohZvHM0rin5Q@mail.gmail.com>

Show all headers | View raw


xyz2041 scripsit:

> What am I missing?

That grep and similar Posix utilities do not understand \t.  Instead,
use \011 (the octal code for tab):

$ grep -v '\011' o.csv > o-out.csv

You need to put the \011 in single quotes, otherwise the shell will interpret
the \0 sequence as equivalent to simple 0.

-- 
John Cowan          http://www.ccil.org/~cowan        cowan@ccil.org
But no living man am I!  You look upon a woman.  Eowyn I am, Eomund's daughter.
You stand between me and my lord and kin.  Begone, if you be not deathless.
For living or dark undead, I will smite you if you touch him.

Back to gnu.utils.bug | Previous | Next | Find similar


Thread

Re: Just want to exclude lines with tabs John Cowan <cowan@mercury.ccil.org> - 2016-05-19 10:56 -0400

csiph-web