From: Artem Bityutskiy Date: Fri, 3 Aug 2012 07:11:02 +0000 (+0300) Subject: stress-test.sh: do not use pipe unnecessarily X-Git-Tag: v1.5.1~64 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=877504a823195b33b9cea74ced19492b91e2a0ed;p=mtd-utils.git stress-test.sh: do not use pipe unnecessarily Use 'grep patt file' instead of cat file | grep patt. Signed-off-by: Artem Bityutskiy --- diff --git a/tests/ubi-tests/stress-test.sh b/tests/ubi-tests/stress-test.sh index ad9a2af..c92525e 100755 --- a/tests/ubi-tests/stress-test.sh +++ b/tests/ubi-tests/stress-test.sh @@ -62,9 +62,9 @@ fi # Make sure neither mtdram nor nandsim are used nandsim_patt="NAND simulator" mtdram_patt="mtdram test device" -! cat /proc/mtd | grep -q "$nandsim_patt" || +! grep -q "$nandsim_patt" /proc/mtd || fatal "the nandsim driver is already used" -! cat /proc/mtd | grep -q "$mtdram_patt" || +! grep -q "$mtdram_patt" /proc/mtd || fatal "the mtdram driver is already used" rmmod ubi >/dev/null 2>&1 ||: