mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Destroyed ”ErrorCode (markdown)
@@ -1,15 +0,0 @@
|
|||||||
##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' +
|
|
Reference in New Issue
Block a user