Skip to content

Instantly share code, notes, and snippets.

@dipakc
Created September 29, 2019 22:20
Show Gist options
  • Select an option

  • Save dipakc/169a15c5864596d55dec079cd007fd5a to your computer and use it in GitHub Desktop.

Select an option

Save dipakc/169a15c5864596d55dec079cd007fd5a to your computer and use it in GitHub Desktop.
Shell scripting tips

Accessing arugments from previous commands

echo a b c d
a b c d

echo !:2
b

If you press tab after !:2, it is expanded to 2nd argument from the previous command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment