I’m trying to join all of the arguments to a Bash function into one single string with spaces separating each argument. I also need to have the string include single quotes around the whole string.
Here is what I have so far…
$array=("$@")
str="'"
for arg in "${array[@]}"; do
let $str=$str+$arg+" "
done
let $str=$str+"'"
Obviously this does not work but I’m wondering if there is a way to achieve this?