Chapter 1: The Role of Algorithms in Computing

@fabioyamate @andrielfn @laurocaetano just finished the answers for chapter 1.

However didn't answer one of the exercises.
Are you sure it does not fail? I tested with my version of `pdflatex` and it does finishes with status `1` on failure.

What are you trying to do in your conditional? The `-e` conditional tests for file existence, so you are actually testing if file `0` or `1` (according to exit status of the command) exist.

You could just use plain `if` and pass the command along:

~~~sh
if pdflatex -interaction=nonstopmode -output-directory=$output_dir $filename.tex > /dev/null; then
  # ...
fi
~~~