[Top][All Lists]

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

Re: printf %q represents null argument as empty string.

From: John Kearney
Subject: Re: printf %q represents null argument as empty string.
Date: Sat, 12 Jan 2013 15:48:35 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2

Am 12.01.2013 15:34, schrieb Dan Douglas:
> On Friday, January 11, 2013 10:39:19 PM Dan Douglas wrote:
>> On Saturday, January 12, 2013 02:35:34 AM John Kearney wrote:
>> BTW, your wrappers won't work. A wrapper would need to implement format 
> Hrmf I should have clarified that I only meant A complete printf wrapper 
> would 
> be difficult. A single-purpose workaround is perfectly fine. e.g.
> printq() { ${1+printf %q "$@"}; }; ... which is probably something like what 
> you meant. Sorry for the rant.
Don't worry I've got a thick skin ;) feel free to rant, you have a
different perspective and I like that.

anyway now we have a point I disagree that

should expand to 0 or more words, from the documentation it should be 1
or more. At least that is how I read  that paragragh. IT says it will
split the word not make the word vanish.
so I had to test and it really does how weird, is that in the posix spec?.
set --
test_func() { echo $#; }
test_func "address@hidden"
test_func "address@hidden"
test_func "${@:-}"
test_func "address@hidden"

Now I'm confused ...

oh well sorry had the functionality differently in my head.

reply via email to

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