From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LCtjJ-0004K1-Sj for qemu-devel@nongnu.org; Wed, 17 Dec 2008 05:34:13 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LCtjH-0004Jb-7e for qemu-devel@nongnu.org; Wed, 17 Dec 2008 05:34:12 -0500 Received: from [199.232.76.173] (port=54649 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LCtjG-0004JX-TG for qemu-devel@nongnu.org; Wed, 17 Dec 2008 05:34:10 -0500 Received: from rcsinet11.oracle.com ([148.87.113.123]:21302 helo=rgminet11.oracle.com) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LCtjG-0008Rx-Hm for qemu-devel@nongnu.org; Wed, 17 Dec 2008 05:34:10 -0500 Received: from rgminet15.oracle.com (rcsinet15.oracle.com [148.87.113.117]) by rgminet11.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mBHAZHVp029343 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 17 Dec 2008 10:35:19 GMT Received: from acsmt706.oracle.com (acsmt706.oracle.com [141.146.40.84]) by rgminet15.oracle.com (Switch-3.3.1/Switch-3.3.1) with ESMTP id mBHAYE2V032174 for ; Wed, 17 Dec 2008 10:34:15 GMT Message-ID: <4948D59A.9040102@oracle.com> Date: Wed, 17 Dec 2008 10:34:02 +0000 From: John Haxby MIME-Version: 1.0 Subject: Re: [Qemu-devel] configure echo usage References: <5ED905FB-CB4B-45D3-99B7-3D415750F2C4@sonous.com> <4948C721.2060507@oracle.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Andreas Schwab wrote: > John Haxby writes: > > >> echo "# Configured with:$(printf " '%s'" "$0" "$@")" >> $config_mak >> > > You don't need echo if you have printf. > > { printf "# Configured with:" > printf " '%s'" "$0" "$@" > } >> $config_mak > > You're missing a new line :-) Seriously though, there are any number of ways to do the job, some longer and more obscure than others. If you don't have printf and echo -n you can still do it: echo $(echo "# Configured with:"; for i in "$0" "$@"; do echo "'$i'"; done) and there are ways of using 'tr -d' as well. And, I'm sure, many others. We should have a Holiday Competition for the most obscure :-) jch