Building on a solution to one of many similar questions:
#!/bin/sh
IFS=+
printf '%s = %s\n' "$*" "$(($*))"
"$*"will expand to the positional parameters (the command line arguments), separated by$IFS. We setIFSto+separately."$(($*))"uses$(( ... )), which is an arithmetic substitution, to evaluate the arithmetic value of$*, the command line arguments with+in-between them.printfis used to output the two strings with a=between them.
Testing:
$ ./script.sh 1 2 3
1+2+3 = 6
$ ./script.sh -1 2 3
-1+2+3 = 4
$ ./script.sh 1 2 3 4 2 2 3 1
1+2+3+4+2+2+3+1 = 18
What's missing in the script above is a verification of the supplied command line arguments, to make sure they are integers. This is done for one value in the question "https://unix.stackexchange.com/questions/151654/checking-if-an-input-number-is-an-integer".