From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=57614 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTjfE-00005p-Ua for qemu-devel@nongnu.org; Fri, 17 Dec 2010 18:24:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PTjfD-00008o-Tr for qemu-devel@nongnu.org; Fri, 17 Dec 2010 18:24:40 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36278) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PTjfD-00008i-N1 for qemu-devel@nongnu.org; Fri, 17 Dec 2010 18:24:39 -0500 Message-ID: <4D0BF13D.8010606@redhat.com> Date: Sat, 18 Dec 2010 00:24:45 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1292536325-12881-1-git-send-email-weil@mail.berlios.de> <4D0A95BC.8040509@redhat.com> <4D0B6922.3090401@redhat.com> <4D0BB3A1.30001@mail.berlios.de> <7DDF4A15-DEEC-422A-94C7-8ED20B6DAA92@web.de> <4D0BC00B.3040800@mail.berlios.de> <4D0BD533.4060902@redhat.com> <1A791C39-38A1-4823-8E1F-27A38594E2A4@web.de> In-Reply-To: <1A791C39-38A1-4823-8E1F-27A38594E2A4@web.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] Re: [PATCH] win32: Fix CRLF problem in make_device_config.sh List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?ISO-8859-1?Q?Andreas_F=E4rber?= Cc: QEMU Developers On 12/17/2010 11:17 PM, Andreas F=E4rber wrote: >>>> Example (needs bash's echo -e): >>>> >>>> # create line with crlf ending: >>>> echo -e 'include xy\r' >file >>>> >>>> # returns xy\r: >>>> awk '/^include / {ORS=3D" "; print $2}' file | od >>> >>> 0000000 074570 020015 >>> 0000004 >>> >>>> # should return xy: >>>> awk '/^include / {ORS=3D" "; sub(/\r$/, "", $2); print $2}' file | o= d >>> >>> awk: syntax error near line 1 >>> awk: illegal statement near line 1 >>> 0000000 >> >> Can you try \015 instead of \r? > > Same. Then I guess Stefan should use tr -d '\015' < file | awk '/^include / {ORS=3D" "; print $2}' or something like that. Paolo