Set up automatic networking alias for @Mac terminal
#= alias for connect wifi.
alias lsnt=‘networksetup -listallhardwareports’ # list network device
alias lswf=’/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport scan’ # scan wifi, and show list
alias onwf=‘networksetup -setairportpower en0 on’
alias offwf=‘networksetup -setairportpower en0 off’
alias lkwf=‘networksetup -setairportnetwork en0’
#- alias lk413=‘networksetup -setairportnetwork en0 HUAWEI-xxx passwd’
alias lk413=‘lkwf HUAWEI-xxx passwd’
alias lsbb=‘lsbb(){ lswf | grep pi | cut -c 23-32 | grep “$1” ;}; lsbb’ # scan BB wifi, and show list
alias lkbb=‘lkbb(){ lkwf “$1” passwd ; }; lkbb’
alias lkb=‘lkb(){ lkwf lsbb "$1"
passwd ; }; lkb’