Add eth-ip function

This commit is contained in:
crater2150 2017-03-06 17:14:54 +01:00
parent ad7a068e78
commit c5211a17f1
2 changed files with 6 additions and 2 deletions

View file

@ -312,6 +312,10 @@ urlencode() {
#}}}
eth-ip() {
ip a show primary dev ${1:-/sys/class/net/en*~*/lo(:t)} | awk '/\s*inet / { split($2,a,"/");print a[1] }'
}
fasel-tunnel() {
if [[ -z "$1" || -z "$2" || "$1" == "-h" || "$1" == "--help" ]]; then
echo "Usage: fasel-tunnel <host> <port> [remote_port]"