Bash Scripts

Bash Scripts are executable files that allow you to run multiple shell commands with one file. They can be useful for file management or automating tasks. Bash Scripts aren't strictly necessary when using the HPC, but they make large tasks more manageable.

Greet Example Script

What it does: The Greet Script welcomes the user by telling them the time of day. The script takes one input and it's the user's name. If the user's name is Brandon, the script will give them a compliment.

Greet Bash Script

Count Example Script

What it does: The Count Script will count in the terminal one number at a time until it reaches n. The script takes one input and it's the value n. The script waits one second in between each count.

Count Bash Script

Count and Greet Example Script

What it does: The Count-and-Greet Script simply combines runs the count script and then immediately runs the greet script. It takes two inputs first n (the number to count), and then the user's name.

Count and Greet Bash Script

Remove Output Example Script

What it does: The Remove-Output Script is an example of something that might actually be useful. When it runs it will find all of the files with the ".out" extension and delete them. This is useful because when you run jobs on the HPC you will get an output file. They can clutter your home directory if you don't manage them!

Remove Output Bash Script