[Lunar-commits] <lunar> Remove unnecessary use of grep
Stefan Wold
ratler at lunar-linux.org
Sat Jan 5 08:56:33 CET 2013
commit 61242b924067e769891f9d36029c5f73731ff8fb
Author: Stefan Wold <ratler at lunar-linux.org>
Date: Fri, 04 Jan 2013 23:56:33 -0800
URL: https://github.com/lunar-linux/lunar/commit/61242b924067e769891f9d36029c5f73731ff8fb
Remove unnecessary use of grep
---
libs/uniqid.lunar | +2/-2
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/libs/uniqid.lunar
+++ b/libs/uniqid.lunar
@@ -30,8 +30,8 @@ create_uniq_id() {
return
fi
- IFACE=$(ip route | grep ^default | awk '{print $5}')
- UNIQID=$(ip addr show $IFACE | grep 'link/ether' | awk '{print $2}' |\
+ IFACE=$(ip route | awk '/^default/ {print $5}')
+ UNIQID=$(ip addr show $IFACE | awk '/link\/ether/ {print $2}' |\
tr 'A-Z' 'a-z' | md5sum | awk '{print $1}')
export UNIQID
More information about the Lunar-commits
mailing list