#+Title: Example * one table | 1 | 2 | | 2 | 4 | | 3 | 6 | | 4 | 8 | | 5 | 10 | * another table | 20 | 20 | * and one more | 0 | 1 | | 0 | 1 | * here we sum them up #+begin_src sh :results scalar :var file=(buffer-file-name) :var col=1 cat $file|grep "^|"|sed 's/|//g'|awk '{ sum += $1} END{ print sum }' #+end_src #+RESULTS: : 35