How can I use a dash in
x=xxx printf -v args "-x=%s" "$x" printf "$var"
But it gives an error:
./tmp.sh: line 2: printf: -x: invalid option printf: usage: printf [-v var] format [arguments]
I know that it's because
-x as an option, but how to overcome it?
printf to create a string that will correspond to command line arguments like
-x=xxx -y=yyy -z=zzz. Then I want to call a tool like
eval $tool args