Robert Mark Bram
2005-02-20 04:55:35 UTC
Hi All!
I cannot seem to use grep for tabs. Here is what I have tried..
This shows that there are tabs in the file test.txt:
Robert Mark Bram - /tmp
$cat test.txt | sed s/[\\t]/tab/g
tabdr
tabHow
tabHow
tabHow
tabHow
How
How
And these lines show how I am trying to grep for tab, but with no luck!
Robert Mark Bram - /tmp
$grep -e [\\t]How test.txt
Robert Mark Bram - /tmp
$grep -e [\t]How test.txt
Robert Mark Bram - /tmp
$grep -e "[\t]How" test.txt
Robert Mark Bram - /tmp
$grep -e "[\\t]How" test.txt
Robert Mark Bram - /tmp
$
Am I missig something? Or is it cygwin grep?
Any advice would be most appreciated!
Rob
:)
--
Robert Mark Bram
http://phd.netcomp.monash.edu.au/RobertMarkBram/default.asp
B.Comp.(Systems Development/Business Systems)
B.Net.Comp.(Hons)
Doctor of Philosophy Student
School of Network Computing
Faculty of Information Technology
Monash University
Peninsula Campus
McMahons Rd
Frankston, VIC 3199
AUSTRALIA
I cannot seem to use grep for tabs. Here is what I have tried..
This shows that there are tabs in the file test.txt:
Robert Mark Bram - /tmp
$cat test.txt | sed s/[\\t]/tab/g
tabdr
tabHow
tabHow
tabHow
tabHow
How
How
And these lines show how I am trying to grep for tab, but with no luck!
Robert Mark Bram - /tmp
$grep -e [\\t]How test.txt
Robert Mark Bram - /tmp
$grep -e [\t]How test.txt
Robert Mark Bram - /tmp
$grep -e "[\t]How" test.txt
Robert Mark Bram - /tmp
$grep -e "[\\t]How" test.txt
Robert Mark Bram - /tmp
$
Am I missig something? Or is it cygwin grep?
Any advice would be most appreciated!
Rob
:)
--
Robert Mark Bram
http://phd.netcomp.monash.edu.au/RobertMarkBram/default.asp
B.Comp.(Systems Development/Business Systems)
B.Net.Comp.(Hons)
Doctor of Philosophy Student
School of Network Computing
Faculty of Information Technology
Monash University
Peninsula Campus
McMahons Rd
Frankston, VIC 3199
AUSTRALIA