[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH] win32: Fix CRLF problem in make_device_config.s

From: Paolo Bonzini
Subject: [Qemu-devel] Re: [PATCH] win32: Fix CRLF problem in make_device_config.sh
Date: Sat, 18 Dec 2010 00:24:45 +0100
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20101103 Fedora/1.0-0.33.b2pre.fc14 Lightning/1.0b3pre Mnenhy/0.8.3 Thunderbird/3.1.6

On 12/17/2010 11:17 PM, Andreas Färber wrote:
Example (needs bash's echo -e):

# create line with crlf ending:
echo -e 'include xy\r' >file

# returns xy\r:
awk '/^include / {ORS=" "; print $2}' file | od

0000000 074570 020015

# should return xy:
awk '/^include / {ORS=" "; sub(/\r$/, "", $2); print $2}' file | od

awk: syntax error near line 1
awk: illegal statement near line 1

Can you try \015 instead of \r?


Then I guess Stefan should use

tr -d '\015' < file | awk '/^include / {ORS=" "; print $2}'

or something like that.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]