Re: Just want to exclude lines with tabs

Manuel Collado <[email protected]> Fri, 20 May 2016 18:54:29 +0200
Newsgroups gmane.comp.gnu.utils.bugs
Organization Aioe.org NNTP Server
Message-ID <[email protected]>
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.