qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] configure echo usage


From: John Haxby
Subject: Re: [Qemu-devel] configure echo usage
Date: Wed, 17 Dec 2008 10:34:02 +0000
User-agent: Thunderbird 2.0.0.18 (X11/20081119)

Andreas Schwab wrote:
John Haxby <address@hidden> 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




reply via email to

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