ia64/xen-unstable
changeset 9056:b6af6ab53c67
Use cleverer sed pattern to avoid use of head -1.
Signed-off-by: Ewan Mellor <ewan@xensource.com>
Signed-off-by: Ewan Mellor <ewan@xensource.com>
author | emellor@leeni.uk.xensource.com |
---|---|
date | Mon Feb 27 17:16:28 2006 +0100 (2006-02-27) |
parents | b30564f40914 |
children | c028ba081c84 |
files | tools/examples/vif-common.sh |
line diff
1.1 --- a/tools/examples/vif-common.sh Mon Feb 27 17:16:04 2006 +0100 1.2 +++ b/tools/examples/vif-common.sh Mon Feb 27 17:16:28 2006 +0100 1.3 @@ -125,7 +125,7 @@ function handle_iptable() 1.4 # 1.5 function ip_of() 1.6 { 1.7 - ip addr show "$1" | awk "/^.*inet.*$1\$/{print \$2}" | sed 's,/.*,,' | head -1 1.8 + ip addr show "$1" | awk "/^.*inet.*$1\$/{print \$2}" | sed -n '1 s,/.*,,p' 1.9 } 1.10 1.11