DEV Community

Discussion on: Make the computer work for you! Automate the boring stuff!

Collapse
 
lexplt profile image
Alexandre Plt

I would also advise on using mkdir -p folder/ so that it doesn't raise an error if it already exists!

Don't forget to abuse !! to repeat the last command you entered in a bash, and use subshell to avoid cd .. : (cd stuff/foo/bar; python3 do-stuff.py). Using parenthesis create a subshell and everything inside is executed on the shell leaving your shell unaffected.

Last thing but not least, which I really love : crontabs. I use them for anything, from checking if my discord bot is up and rebooting, to automatically docker prune images and containers, updating libs by periodically fetching its latest release and installing it.

Collapse
 
geekypandey profile image
Anurag Pandey

crontabs sounds fun!