Reimplemented bash commands in python.