Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
Merge branch 'Setup' of https://github.com/soztag/fossos into Setup
Browse files Browse the repository at this point in the history
  • Loading branch information
t-rop committed Apr 1, 2019
2 parents c038790 + 859dd5d commit 8889d74
Showing 1 changed file with 30 additions and 2 deletions.
32 changes: 30 additions & 2 deletions stack.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,12 @@ You also need to *configure* git on your machine, and wherever else you are usin

<a class="btn btn-info" href="https://en.wikipedia.org/wiki/Bash_(Unix_shell)" role="button">Install Bash Shell</a>

The bash shell is the standard Unix-style command-line interface (CLI) (as opposed to a point-and-click graphical user interface, or GUI).
A shell is a command-line interface (CLI) to your computer (as opposed to a point-and-click graphical user interface, or GUI).
You may also know this as "the console", or "the terminal".

There are technically different *kinds* of shells, though the `bash` shell is the most widespread, and is often used interchangeably with *the* shell.

A lot of programs that we'll be using only run at the CLI, so it's important to know how to use it.
It is also often used in scripting (= automating) tasks.

On **macOS**, **Linux**: Nothing to install, ships with bash.

Expand Down Expand Up @@ -315,6 +318,31 @@ However this is strictly optional, will not be supported in class.
- [The Unix shell](https://swcarpentry.github.io/shell-novice/02-filedir/index.html)


### Bash {#bash}

It turns out that `bash`, the default shell on UNIX-type computers is *also* a **scripting language** upon itself.
[Scripting languages](https://en.wikipedia.org/wiki/Scripting_language) are programming languages which facilitate automated execution of tasks, such as, say, running a bunch of updates and then power cycling your computer.

`bash` isn't necessarily the greatest scripting language; especially for more complicated projects, "proper" scripting languages such as Python, Ruby or R might serve you better.

But `bash` has the advantage that it is available in (almost all) UNIX-type computing environments, so it's often the easiest way to automate steps.
It looks a bit arcane (because it is), but you don't need much to build powerful scripts that can save you a lot of time.

This entire topic and the below *additional resources* is recommended for advanced readers.
You won't need this starting out.


#### Additional Resources

- [The Unix Workbench](https://seankross.com/the-unix-workbench/index.html)
- [Writing Shell Scripts - Beginners Guide](https://medium.com/tech-tajawal/writing-shell-scripts-the-beginners-guide-4778e2c4f609)
- [Bash Boilerplate](http://bash3boilerplate.sh)
- [Bash programming by (counter-)example](http://matt.might.net/articles/bash-by-example/)
- [Tips and Tricks for good Bash Scripts](https://codeburst.io/13-tips-tricks-for-writing-shell-scripts-with-awesome-ux-19a525ae05ae)
- [Bash Scripting Best Practices](https://sap1ens.com/blog/2017/07/01/bash-scripting-best-practices/)
- [Writing Readable Bash Scripts](https://mads-hartmann.com/2017/06/16/writing-readable-bash-scripts.html)
- [Google Shell Style Guide](https://google.github.io/styleguide/shell.xml)


### Package Management {#pkg-mngt}

Expand Down

0 comments on commit 8889d74

Please sign in to comment.