bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: Just want to exclude lines with tabs


From: Manuel Collado
Subject: Re: Just want to exclude lines with tabs
Date: Fri, 20 May 2016 18:54:29 +0200
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0

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.



reply via email to

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