@rob_rich

How to Automate a Process with Bash


by Rob Richardson

  @rob_rich

https://robrich.org/

About Me

Rob Richardson

Rob Richardson is a software craftsman building web properties in ASP.NET and Node, React and Vue. He's a frequent speaker at conferences, user groups, and community events, and a diligent teacher and student of high quality software development. You can find this and other talks on https://robrich.org/presentations and follow him on twitter at @rob_rich.

Why Bash?

Which shell?

Which shell?

see also https://linuxhint.com/powershell-bash-shell-scripting/

Demo

Running commands from bash shell

Let's build it

Recursively count the number of files in the directory

Let's build it

Submit the JSON data to the API

Let's build it

Download weather forecast for location

Level-up with Bash

Helpful shell commands

Let's build it

Parse report:

  • copy report from file share
  • print sum of column 8
  • print line count
  • error if file not found

Let's build it

DevOps build:

  • git checkout latest
  • docker build & push
  • start on kubernetes

How do we automate this?

With bash scripts.