Monday, October 22, 2018

BASH Tips

Gnome Terminal Theme

https://github.com/Mayccoll/Gogh

Use arguments from previous command

!^ first argument !$ last argument !* all arguments !:2 second argument !:2-3 second to third arguments !:2-$ second to last arguments !:2* second to last arguments !:2- second to next to last arguments !:0 the command !! repeat the previous line

Using first argument

echo a b c d a b c d echo !:1 echo a a

Using last argument

echo a b c d a b c d echo !$ echo d d

No comments: