From 6056cf94eb6bb5084249350097eb7cbf185b04d2 Mon Sep 17 00:00:00 2001 From: Michael Diamond Date: Mon, 20 Jan 2020 23:04:52 -0800 Subject: [PATCH] Add Docker example --- Recursiveness.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Recursiveness.md b/Recursiveness.md index 7dee90c..dccf746 100644 --- a/Recursiveness.md +++ b/Recursiveness.md @@ -33,5 +33,12 @@ To check files whose shebang indicate that they are sh/bash/ksh scripts: ``` # POSIX -find /path/to/scripts -type f -exec grep -Eq '^#!(.*/|.*env +)(sh|bash|ksh)' {} \; | xargs shellcheck +find /path/to/scripts -type f -exec grep -Eq '^#!(.*/|.*env +)(sh|bash|ksh)' {} \; \ + | xargs shellcheck +``` + +## With Docker + +``` +docker run --volume /path/to/scripts:/mnt koalaman/shellcheck-alpine sh -c "find /mnt -name '*.sh' | xargs shellcheck" ``` \ No newline at end of file