From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx> We only use grep in one place where we can use the -regex option of find instead. Switch to using find --regex and drop grep entirely from the tools test-suite. Suggested-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx> --- tools/gpio-tools-test.bash | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/gpio-tools-test.bash b/tools/gpio-tools-test.bash index efd895d..f910282 100755 --- a/tools/gpio-tools-test.bash +++ b/tools/gpio-tools-test.bash @@ -162,7 +162,7 @@ gpiosim_cleanup() { ls $BANKPATH/line* > /dev/null 2>&1 if [ "$?" = "0" ] then - for LINE in $(find $BANKPATH/ | grep -E "line[0-9]+$") + for LINE in $(find $BANKPATH/ -regex ".*line[0-9]+$") do test -e $LINE/hog && rmdir $LINE/hog rmdir $LINE @@ -3078,7 +3078,6 @@ check_prog() { check_prog shunit2 check_prog modprobe check_prog timeout -check_prog grep # Check if we're running a kernel at the required version or later check_kernel $MIN_KERNEL_VERSION -- 2.43.0