[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: grep
From: |
Alfred M. Szmidt |
Subject: |
Re: grep |
Date: |
25 Jun 2002 18:22:11 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
* Holger Lehmann writes:
> Ok, ok I admit it: *I am* stupid. I got that from some other manpage where I
> found all the escape chars.
Man pages suck. :)
>>
>> Which is probobly what is happening. Grepping for an ^H works just
>> fine (you can insert it with C-v C-h in bash). The file `blah'
>> contains ^H's.
>>
>> address@hidden:~$ grep '^^H' blah | wc -c
>> 5
> Does not work, sorry. I tried that. Try it out and use the test.txt file
> attached to my original message. You might even send me a shell script.
> Typing this:
> grep '^<Control-V><Control-H>' test.txt
Maybe the test.txt file doesn't have ^H's? But some other weird
character?
I attached an file with a bunch of ^H's, could you try that? And
do something like:
grep '^C-vC-h' backspaces | wc -l # Should be 5 ...
grep '^C-vC-h' backspaces | wc -c # and this should be 40.
I haven't really bothered checking your attachments, the lazy fool I
am.
> Now for a different idea: anyone knows if I can grep for a char when I know
> the octal or hexadecimal code for it ? Like 0xa0 or 0240 ???
> tr does this with \NNN for octal numbers ... I was not able to find any
> equivalent for grep so far ....
> (Maybe I am not only stupid but blind as well ?)
If no such functionality exists (I haven't checked) then maybe you
would like to implement this? :)
backspaces
Description: Binary data
--
Alfred M. Szmidt
- grep, Tuan Nguyen, 2002/06/06
- grep, Holger Lehmann, 2002/06/25
- Re: grep, Alfred M. Szmidt, 2002/06/25
- Re: grep, Holger Lehmann, 2002/06/25
- Re: grep,
Alfred M. Szmidt <=
- Re: grep, Holger Lehmann, 2002/06/25
- Re: grep, Stepan Kasal, 2002/06/25
- Re: grep, Alfred M. Szmidt, 2002/06/25