9 lines
212 B
Bash
Executable File
9 lines
212 B
Bash
Executable File
#!/bin/bash
|
|
|
|
sed 's/[a-z]//g' | \
|
|
tee >(cut -c 1 > /tmp/firstdigits) | \
|
|
tee >(rev | cut -c 1 > /tmp/seconddigits) > /dev/null | \
|
|
paste - /tmp/firstdigits /tmp/seconddigits -d "" | \
|
|
paste -sd+ | \
|
|
bc
|