Level Up

by
Annika Backstrom
in Uncategorized on 9 November 2012. #Personal#Scripting#Bash#Terminal

Last month I tweeted about the progression one might see as he gets more comfortable in a terminal window (in my case, bash). Archived here, for posterity: repeating the last command you typed into bash.

Level 1, history via the up arrow:

Level 2, history without the arrow:

Level 3, parameter expansion:

!!

Level 4, loop that waits for enter key:

while true ; do cmd ; read foo ; done

Bonus Level 5, loop that waits for filesystem event:

while true ; do inotifywait -e modify filename ; cmd filename ; done