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 "${@}" 0 test_func "1${@}" 1 test_func "${@:-}" 1 test_func "${@-}" 1 Now I'm confused ... oh well sorry had the functionality differently in my head.