From d09d758e440a2e79b5cb5e766075c0719af83609 Mon Sep 17 00:00:00 2001 From: Pat Myron Date: Sat, 30 Mar 2019 23:02:51 -0400 Subject: [PATCH] removing need for globstar --- Recursiveness.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Recursiveness.md b/Recursiveness.md index 48d0bc7..0326de4 100644 --- a/Recursiveness.md +++ b/Recursiveness.md @@ -16,12 +16,11 @@ To check files with one of multiple extensions: ``` # Bash 4+ -# globstar makes ** recursive. -# nullglob will prevent one of the extension pattens from appearing in the arg list +# nullglob will prevent one of the extension patterns from appearing in the arg list # if they don't match. -# dot glob will match shell scripts in hidden directories. +# dotglob will match shell scripts in hidden directories. shopt -s globstar nullglob dotglob -shellcheck /path/to/scripts/**/*.{sh,bash,ksh,bashrc,bash_profile,bash_login,bash_logout} +shellcheck /path/to/scripts/**.{sh,bash,ksh,bashrc,bash_profile,bash_login,bash_logout} # POSIX find /path/to/scripts -type f \( -name "*.sh" -o -name "*.bash" -o -name "*.ksh" -o -name "*.bashrc" -o -name "*.bash_profile" -o -name "*.bash_login" -o -name "*.bash_logout" \) -print |