samhstn / my-config

16 stars 0 forks source link

Copy couple of useful commands #73

Closed samhstn closed 5 years ago

samhstn commented 5 years ago

Thanks for pushing up your dotfiles @eliascodes! (https://github.com/eliascodes/dotfiles)

Would be good to add these couple of aliases:

alias tree="ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'" alias myip='ifconfig | grep "inet " | grep -v 127.0.0.1 | cut -d\ -f2'

samhstn commented 5 years ago

Actually, I would prefer not including tree (slightly too messy and find and grep combos can be used instead with much finer control).

For the myip alias, I think I prefer:

alias myip='ifconfig | grep "inet" | grep -v "127.0.0.1" | awk "{print \$2}"'