Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notes for the Intro to automation lesson #247

Open
fpsom opened this issue Jul 1, 2017 · 0 comments
Open

Notes for the Intro to automation lesson #247

fpsom opened this issue Jul 1, 2017 · 0 comments

Comments

@fpsom
Copy link
Collaborator

fpsom commented Jul 1, 2017

Notes to be included in the lesson

-Use set -x: stops the execution of a script if a command or pipeline has an error - which is the opposite of the default shell behaviour, which is to ignore errors in scripts

-Use set -e: prints out each command before executing it - extra useful for debug

Both options are great to include in the beginning of the file

  • Include #! /bin/bash in the beginning of the script to define the script interpreter

  • Include bash <scriptfile> as a means of running the script file (instead of going directly to ./<scriptfile>)

  • Include information on batch scripts

  • Check for flag in curl for not re-downloading the file every single time

  • Add the way to rename a screen; at creation screen -S <name>, after creation Ctrl+a, :sessionname <name>

  • Add commands to detach a screen without the shortcut: screen -d <ID>

  • Another way to terminate a screen without needing to reattach: screen -X -S [session # you want to kill] quit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant