fix bugs caused by unquoted variable(s); remove unnecessary grep in ips func

This commit is contained in:
oxnz
2014-12-08 00:32:53 +08:00
parent 82d5eedae3
commit c3c40e506b
2 changed files with 4 additions and 4 deletions

View File

@@ -5,7 +5,7 @@ function ips ()
{
about 'display all ip addresses for this host'
group 'base'
ifconfig | grep "inet " | awk '{ print $2 }'
ifconfig | awk '/inet /{ print $2 }'
}
function down4me ()
@@ -210,5 +210,5 @@ function buf ()
group 'base'
local filename=$1
local filetime=$(date +%Y%m%d_%H%M%S)
cp ${filename} ${filename}_${filetime}
cp "${filename}" "${filename}_${filetime}"
}