* ip_address, network: awk seems to be more efficient than sed, in this

case


Signed-off-by: Dustin Kirkland <kirkland@canonical.com>
This commit is contained in:
Dustin Kirkland 2009-06-21 12:21:45 -05:00
commit db9e26d3cc
3 changed files with 5 additions and 3 deletions

View file

@ -29,7 +29,7 @@ fi
[ "$hostname" = "1" ] && space=" "
[ "$whoami" = "1" ] && space=" "
interface=`/sbin/route -n | tail -n 1 | sed "s/^.* //"`
interface=`/sbin/route -n | tail -n 1 | awk '{print $8}'`
ipaddr=`/sbin/ifconfig "$interface" | grep "inet addr:" | sed "s/^.*inet addr://" | sed "s/ .*$//"`
printf "%s\005{+b }%s\005{-}" "$space" "$ipaddr"

View file

@ -23,7 +23,7 @@ PKG="byobu"
if [ -r "$HOME/.$PKG/network" ]; then
interface=`cat "$HOME/.$PKG/network"`
else
interface=`/sbin/route -n | tail -n 1 | sed "s/^.* //"`
interface=`/sbin/route -n | tail -n 1 | awk '{print $8}'`
fi
if [ "$1" = "--detail" ]; then

4
debian/changelog vendored
View file

@ -29,11 +29,13 @@ byobu (2.13) unreleased; urgency=low
file, all disabled by default; in byobu-config, if the user's windows
file is empty, show the examples in the default window management
panel
* ip_address, network: awk seems to be more efficient than sed, in this
case
[ Ciemon Dunville ]
* byobu.1: reflect the keybinding toggle change to Ctrl-a-!
-- Dustin Kirkland <kirkland@ubuntu.com> Sun, 21 Jun 2009 12:12:00 -0500
-- Dustin Kirkland <kirkland@ubuntu.com> Sun, 21 Jun 2009 12:21:23 -0500
byobu (2.12-0ubuntu1) karmic; urgency=low