4 lines
134 B
Plaintext
4 lines
134 B
Plaintext
|
#!/bin/sh
|
||
|
categories=$(( $(cat $1 | grep -oE '[0-9]*$' | wc -l ) - 1 ))
|
||
|
grep -oE '[0-9]*$' $1 | head -n $categories | paste -sd+ | bc
|