That works perfectly! Thank you!

Just to add that I had to have "#+HEADER: :exports none" as I did not want the elisp code to be visible in the exported documents.

#+PROPERTY: header-args:emacs-lisp :var tar-file="bar.tar.gz"

#+NAME: tar-eg
#+HEADER: :exports none
#+BEGIN_SRC emacs-lisp
(format "> tar xzvf %s" tar-file)
#+END_SRC

#+CALL: tar-eg() :wrap example :exports results