Skip to contentSkip to conversation

master - tests: aux.sh replace sed call

PATCH Zdenek Kabelac 1 participant 1 message Jul 10, 2017

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=84e83ac37e652baa686648f1bfb4215e2c0dd206
Commit:        84e83ac37e652baa686648f1bfb4215e2c0dd206
Parent:        928a49a7c8f78dff4add340107ecc46e6a1b8587
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Thu Jul 6 19:11:46 2017 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Mon Jul 10 14:23:53 2017 +0200

tests: aux.sh replace sed call

Use internal shell vars manips

---
 test/lib/aux.sh |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
test/lib/aux.sh +1 -2
index 6ac57d4..e31c4d7 100644
@@ -960,8 +960,7 @@ disable_dev() {
 	done
 
 	test -n "$silent" || for num in $notify; do
-		notify_lvmetad --major "$(echo "$num" | sed -e "s,:.*,,")" \
-		               --minor "$(echo "$num" | sed -e "s,.*:,,")"
+		notify_lvmetad --major "${num%%:*}" --minor "${num##*:}"
 	done
 }