Created ”ErrorCode (markdown)

tcweave04
2024-11-14 14:33:19 -05:00
parent 7c49a9efa6
commit ecc14d13d4

15
”ErrorCode.md Normal file

@@ -0,0 +1,15 @@
##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' +