function foo() { A=$@... echo $A } foo bla \"hello ppl\"
I would like the output to be: \"bla\" \"hello ppl\"
What do I need to do in
You can use "$@" to treat each parameter as, well, a separate parameter, and then loop over each parameter:
function foo() { for i in "$@" do echo -n \"$i\"" " done echo } foo bla "hello ppl"