bash commands set e
Wow. Sorry. It’s been a while. There really is no excuse why I haven’t posted since my first blog.
Summer has ended, WINTER IS COMING, so been trying to enjoy the outdoors as much as I can before I have to hibernate. I think my github contributions is directly correlated to how cold it is outside :)
I’ve learned a lot of things since then! I want to be a keyboard whiz so I’m learning more about vim and bash to increase my productivity!
Here are some cool tutorials and cheat sheets that I have found useful in my bash and vim adventures:
Enter the command: vimtutorial
in your terminal, & you have an interactive tutorial for vim!
So here’s what I have learned today since it’s fresh in my memory!
##What does ‘set -e’ do?
set -e
causes the shell to exit if any subcommand returns a nonzero exit status
set +e
no exit on a non-zero status
You can turn this on and off throughout a bash script, for example:
set -e
bash code #if this code returns a non zero exit status then the script will terminate
set +e
bash code #this code does not terminate on a non zero exit status
Til next time,
lovelejess
at 09:27