BrockCSC / sandcastle-scripts

Collection of useful scripts for Brock CS students

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sandcastle Scripts

Collection of useful scripts. Learn some things they don't teach you in class.

You may submit scripts in any scripting language (as long as it runs on Sandcastle).

How to use

See any script source for example usage.

If you're submitting a script, be sure to include a usage example in the comments!

Always include a shebang line (e.g. #!/usr/bin/env bash, #!/usr/bin/env python) in your script. This allows users to give it executable permissions and execute it directly.

$ chmod +x myscript.sh
$ ./myscript.sh

instead of

$ bash myscript.sh  # or sh myscript.sh

Learning material

These resources will teach you more than you need to know:

Are we missing an awesome guide? Share it with us!

Tips

Some good flags to set at the beginning of your script:

set -e # Same as 'set -o errexit' - exit on error
set -x # Same as 'set -o xtrace' - show execution on stdout
set -u # Same as 'set -o nounset' - exit if script tries to use an uninitialized variable

Use at your own risk

  • Copyright owners or contributors are not liable for any direct or indirect damages (i.e. don't blame us)
  • You will be held responsible for how you use these scripts
  • Do not use them for abuse or exploits or any malicious intents
  • Commands and activity on Sandcastle are logged, you've been warned
  • Asking for forgiveness is often preferred to asking for permission
    • But use common sense because you can get in deep shit
  • Happy and safe scripting!

About

Collection of useful scripts for Brock CS students


Languages

Language:Shell 100.0%