fix bugs caused by unquoted variable(s); remove unnecessary grep in ips func
parent
82d5eedae3
commit
c3c40e506b
|
|
@ -5,7 +5,7 @@ function ips ()
|
||||||
{
|
{
|
||||||
about 'display all ip addresses for this host'
|
about 'display all ip addresses for this host'
|
||||||
group 'base'
|
group 'base'
|
||||||
ifconfig | grep "inet " | awk '{ print $2 }'
|
ifconfig | awk '/inet /{ print $2 }'
|
||||||
}
|
}
|
||||||
|
|
||||||
function down4me ()
|
function down4me ()
|
||||||
|
|
@ -210,5 +210,5 @@ function buf ()
|
||||||
group 'base'
|
group 'base'
|
||||||
local filename=$1
|
local filename=$1
|
||||||
local filetime=$(date +%Y%m%d_%H%M%S)
|
local filetime=$(date +%Y%m%d_%H%M%S)
|
||||||
cp ${filename} ${filename}_${filetime}
|
cp "${filename}" "${filename}_${filetime}"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ alias 8="pushd +8"
|
||||||
alias 9="pushd +9"
|
alias 9="pushd +9"
|
||||||
|
|
||||||
# Clone this location
|
# Clone this location
|
||||||
alias pc="pushd \`pwd\`"
|
alias pc="pushd \$(pwd)"
|
||||||
|
|
||||||
# Push new location
|
# Push new location
|
||||||
alias pu="pushd"
|
alias pu="pushd"
|
||||||
|
|
@ -73,7 +73,7 @@ G () { # goes to distination dir otherwise , stay in the dir
|
||||||
example '$ G ..'
|
example '$ G ..'
|
||||||
group 'dirs'
|
group 'dirs'
|
||||||
|
|
||||||
cd ${1:-$(pwd)} ;
|
cd "${1:-$(pwd)}" ;
|
||||||
}
|
}
|
||||||
|
|
||||||
S () { # SAVE a BOOKMARK
|
S () { # SAVE a BOOKMARK
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue