Skip to content

Instantly share code, notes, and snippets.

@nh2
Created June 19, 2013 02:32
Show Gist options
  • Save nh2/5811275 to your computer and use it in GitHub Desktop.
Save nh2/5811275 to your computer and use it in GitHub Desktop.
redo: Saves the last command and runs it again when run with no arguments
#!/bin/bash
if [[ -z $@ ]]; then bash .redo; else echo $@ > .redo; $@; fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment