Calculate the sum of digits of a given number
echo 1234 | sed 's/\(.\)/\1\+/g' | sed 's/.$//' | bc -l perl -e 'print eval join "+", split //, 12345;'
echo 1234 | sed 's/\(.\)/\1\+/g' | sed 's/.$//' | bc -l perl -e 'print eval join "+", split //, 12345;'