Skip to content

Latest commit

 

History

History
148 lines (98 loc) · 2.71 KB

slides.md

File metadata and controls

148 lines (98 loc) · 2.71 KB

autoscale: true

Bash


Make each program do one thing well. -- Douglas McIlroy, the inventor of Unix pipes


Expect the output of every program to become the input to another, as yet unknown, program. Don't clutter output with extraneous information. -- Douglas McIlroy, the inventor of Unix pipes


Basic Commands

  • ls
  • cd
  • mv
  • rm

Demo

  • alarm
  • sshvpn
  • pomodoro

Getting Help

  • man
  • info
  • help

Introspection

  • type
  • command -v
  • which

Bash Configuration

  • .bashrc
  • .bash_profile

Live Coding

  • alarm
    • say
    • osascript
  • sshvpn
    • networksetup
    • sudo
    • dtach
  • pomodoro
    • terminal-notifier
    • dtach

Summary


External Dependences

brew install terminal-notifier
brew install dtach

.bashrc

# Default PATH
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin

# ~/bin
export PATH=$HOME/bin:$PATH

.bash_profile

if [ -f "$HOME/.bashrc" ]; then
  . "$HOME/.bashrc"
fi

alias grep="grep --color=yes"
alias ls="/bin/ls -Gp"
alias ll="ls -lp"
alias la='ls -lap'

shebang

#!/usr/bin/env bash

crontab -e

#min    hour    mday    month   wday    command
30       7       *       *       *       /Users/michael/talk/bin/alarm

source

source "common.bash"
. "common.bash"

Questions


References 🤓📚