Skip to content
tcweave04 edited this page Nov 14, 2024 · 3 revisions

##Solution #!/bin/bash

Example: ShellCheck can detect many different kinds of quoting issues

if ! grep -q "backup=true." "$HOME/.myconfig" then echo "Backup not enabled in $HOME/.myconfig, exiting" exit 1 fi if $1 =~ -v(erbose)? then verbose=(-printf "Copying %f\n") fi find backups/
-iname '
.tar.gz'
"${verbose[@]}"
-exec scp {} 'myhost:backups' +

ShellCheck

Each individual ShellCheck warning has its own wiki page like SC1000. Use GitHub Wiki's "Pages" feature above to find a specific one, or see Checks.

Clone this wiki locally