I am using linux and trying to code a loop which can take in variables and concatenates them into an equation. But how do I remove it for the last loop.
printf “(%s + %s) x “, $1, $2
I want to print “(1 + 1) x (2 + 2) x (3 + 3)”, but instead I get “(1 + 1) x (2 + 2) x (3 + 3) x”
What should I do to exclude this last “x”?
I want to print “(1 + 1) x (2 + 2) x (3 + 3)”, but instead I get “(1 + 1) x (2 + 2) x (3 + 3) x”
3