Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > gnu.utils.bug > #2212

Re: Just want to exclude lines with tabs

From Manuel Collado <mcollado@domain.invalid>
Newsgroups gnu.utils.bug
Subject Re: Just want to exclude lines with tabs
Date 2016-05-20 18:54 +0200
Organization Aioe.org NNTP Server
Message-ID <nhnfg1$5bt$1@gioia.aioe.org> (permalink)
References <CAAY=KgOd0CYkx43xZ7WQ1SFj3mABziKEiueN6JohZvHM0rin5Q@mail.gmail.com> <201605192121.u4JLLI4b005478@freefriends.org> <mailman.195.1463714391.6543.bug-gnu-utils@gnu.org>

Show all headers | View raw


El 20/05/2016 a las 5:19, xyz2041 escribió:
>
> I just couldn't get Windows command line to let me put a
> tab on the line, so I wrote a batch file:
>
> set TAB=	
> grep -v "%TAB%" %1.%2  > %1-NoTabs.csv
> grep -v "," %1.%2      > %1-NoCmas.tab
>
> Just hit the tab key after "set TAB=".  Not elegant but it works.

Your solution doesn't work in my Win7 machine. The TAB key is tied to 
the "filename expansion" feature of the command line.

If you can type a TAB after "set TAB=" and it really generates a tab 
character, the you should be able also to type:

grep -v "<TAB>" ....

where <TAB> is the TAB key.

In my case I have to disable the filename expansion feature by launching 
a secondary shell:

C:\Users\mcollado>cmd /F:off
Microsoft Windows [Versión 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. Reservados todos los derechos.

C:\Users\mcollado>grep -v "<TAB>" somefile

And it works.

Back to gnu.utils.bug | Previous | NextPrevious in thread | Find similar


Thread

Re: Just want to exclude lines with tabs xyz2041 <xyz2041@gmail.com> - 2016-05-19 22:19 -0500
  Re: Just want to exclude lines with tabs Manuel Collado <mcollado@domain.invalid> - 2016-05-20 18:54 +0200

csiph-web