On 20-Jun-2012 20:07:58 Srdjan Todorovic wrote:
On 20 June 2012 20:51, mick mbm@rlogin.net wrote:
On Wed, 20 Jun 2012 20:12:07 +0100 (BST) Dan vi5u0-alug@yahoo.co.uk allegedly wrote:
On Wed, 20 Jun 2012, Srdjan Todorovic wrote:
If you look at the original email, there are spaces after the search term and the input filenames.
Actually, the character between the search term and the input filename appears to be something weird - neither a normal space nor a normal underscore.
Yep - not a space character (hex 20) but two very odd characters (hex C2 and A0).
Probably doesn't really matter - copy it from your webmail in the web browser and paste to the terminal. And it works. Probably some unicode stuff. The terminal emulator / shell should surely still know what to do with such a character if it was configured to support unicode?
Regards, Srdjan
I have to say that, when I saw Chris's original email, I saw an underscore separating "CLEARFLOAT" and "*.txt"; and when I pasted Chris's grep command into my xterm it indeed hung.
If interpreted as underscore, it will have th effect of making CLEARFLOAT_*.txt into a single word, so the <filename> part is missing and it is bound to hang.
For what it's worth, when I paste out of the email into the command
echo "grep 'CLEARFLOAT'_*.txt" | od -t x1
I get
0000000 67 72 65 70 20 27 43 4c 45 41 52 46 4c 4f 41 54 0000020 27 5f 2a 2e 74 78 74 0a
and the byte corresponding to the underscore is the 7th back from the end (the last, "0a", is the newline), so has hex code 5F which is ASCII for plain underscore.
Anyway, it looks as though, for whatever reason, something has converted what should have been a space, with ASCII hex code 20, into something which was not, thereby depriving grep of input (see below).
But why, I wonder, does the other space (the one after "grep") not also come out weird?
In the raw file of Chris's email, I see at that point:
grep 'CLEARFLOAT'=A0*.txt
and, in the headers:
Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
meaning that the character at that position has hex encoding A0 in iso-8859-1, aka Latin1 (which contains the Western European accented letters). In this encoding, it seems that code A0 is "NBSP", i.e. non-breaking space. See Wikipedia:
http://en.wikipedia.org/wiki/ISO-8859-1
So, somehow, the ordinary space that should have been there was in fact a non-breaking space. Maybe it was copied from a web-page?
Best wishes, Ted.
------------------------------------------------- E-Mail: (Ted Harding) Ted.Harding@wlandres.net Date: 20-Jun-2012 Time: 22:07:26 This message was sent by XFMail -------------------------------------------------