little bit of what I've done with shell. • The main elements of Bash. • Building a very limited shell with Ruby. • Breaking down some complex shell commands.
count on the shell to be there. • We use it every day. And it is great to “glue” things together • System administrators use it for too many things. You will someday need to understand something they done. • It's a gateway drug to many other interesting things about programming and operating systems. • Its fun.
A “thread pool”. • A script that interacts with github's api and `git clone`'s all repositories under a person or organization. • A Password manager. • Parallel deployment of our frontend @ Xerpa. • A “framework” for build CI jobs. • Monitoring plugins for `Sensu`.
(device) ~ • Bash is untyped. (like assembly, unlike C) • Every value is a string. • Strings are interpreted as commands. • (the best way to really grok Bash is to read its man page. `man bash` is all you need. I'm serious) • `explainshell.com` is pretty good too.
commands. Everything in the Shell is a command. • This idea was described by Antirez (Salvatore Sanfilippo) when explaining the semantics of the TCL language: http://antirez.com/articoli/tclmisunderstood.html
subjected to “parameter expansion” and “substitution” prior to being “executed”. • Substitution is very close to what happens in Ruby when you pass “variables” as “arguments” to a method. Its value is substituted where we see the variable “name”. • Expansion is hard and tricky. I won't talk about it now.
group of “environment variables”. (You can inspect them reading the file `/proc/$pid/environ`). • When you “fork” a process, the child process “inherits” the values of its parent's environment variables.
Bash more akin to what we do with “programming languages”, like loops, conditionals and things like that. • I won't talk about those because you already know enough to explore them by yourself. • When in doubt, check the `man page` or the Bash manual. `explainshell.com` is also your friend.