I'm suddenly (well, since the last time I used Cygwin a week or so ago)
getting an odd error msg:
grep: writing output: Permission denied
when I grep certain files. I am not redirecting output, so if I'm
understanding the msg correctly, it's saying it's having trouble writing
to stdout. Nonetheless, at least some of the the hits grep finds in the
file show up.
I have no idea why this should have started happening. I just freshened
my cygwin files; I'm using bash version 3.2.25(17), and 'grep (GNU grep)
2.5.1'. And stdout looks OK to me:
lrwxrwxrwx 1 maxwell None 15 Oct 18 20:25 /dev/stdout -> /proc/self/fd/1
I just tried redirecting the output of grep to a file 'test'; the file
has 167 lines. When I cat it, it gives me ten or so lines, then an
error msg:
cat: write error: Permission denied
OK, cat is choking on the first line of the file 'test' that has an
acute accented 'a'; 'file' reports this file is ISO-8859-1. I have the
ff. variable set:
LANG=en_US.UTF-8
Does this mean that if I have set my encoding as UTF-8, I can't cat or
grep etc. files that have non-UTF-8 characters? That's inconvenient...I
would much rather it gave me some kind of garbage characters. (I
believe that's what happens if I use a non-Unicode encoding, and cat a
file with non-ASCII Unicode characters.)
--
Mike Maxwell
[EMAIL PROTECTED]
"For over a thousand years, the British Empire was the guardian
of good grammar and the English language.
Before the dark times. Before the Americans."
--Bob Kenobi (Ben Kenobi's younger brother)
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/