OK, now I have just one follow up question. I would like to tangle the result to a separate file.

So I am looking for a way to save the result "> tar xvzf bar.tar.gz" to a separate file. I tried adding ":tangle filename" to #+CALL/#+BEGIN_SRC but that did not help. Adding to #+CALL does not do anything. And adding ":tangle file" to #+BEGIN_SRC block exports the code (not results) to the file as expected.