[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Use cleverer sed pattern to avoid use of head -1.
# HG changeset patch # User emellor@xxxxxxxxxxxxxxxxxxxxxx # Node ID b6af6ab53c6747b709146763c5bd639307e73a61 # Parent b30564f4091490b280e97dbe432ec81e623609ec Use cleverer sed pattern to avoid use of head -1. Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx> diff -r b30564f40914 -r b6af6ab53c67 tools/examples/vif-common.sh --- a/tools/examples/vif-common.sh Mon Feb 27 16:16:04 2006 +++ b/tools/examples/vif-common.sh Mon Feb 27 16:16:28 2006 @@ -125,7 +125,7 @@ # function ip_of() { - ip addr show "$1" | awk "/^.*inet.*$1\$/{print \$2}" | sed 's,/.*,,' | head -1 + ip addr show "$1" | awk "/^.*inet.*$1\$/{print \$2}" | sed -n '1 s,/.*,,p' } _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |