X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Sun, 18 Nov 2007 23:25:46 -0500 From: Mike Maxwell Subject: grep: writing output: Permission denied [encoding issue?] To: cygwin AT cygwin DOT com Message-id: <4741104A.7070408@umiacs.umd.edu> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8; format=flowed Content-transfer-encoding: 7bit User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 maxwell AT umiacs DOT umd DOT edu "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/