replace --no-run-if-empty with -r

Co-authored-by: Karol Wypchło <kwypchlo@gmail.com>
This commit is contained in:
Matthew Sevey 2021-07-27 10:33:20 -04:00 committed by GitHub
parent f0434da421
commit e5fb26ca95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -50,7 +50,7 @@ do
for skylink in "${skylinks[@]}";
do
echo ".. ⌁ Blocking skylink ${skylink} on ${server}"
cached_files_command="find /data/nginx/cache/ -type f | xargs --no-run-if-empty grep -Elsq '^Skynet-Skylink: ${skylink}'"
cached_files_command="find /data/nginx/cache/ -type f | xargs -r grep -Elsq '^Skynet-Skylink: ${skylink}'"
ssh -q -t user@${server} "docker exec -it nginx bash -c ${cached_files_command} | xargs -r rm"
echo ".. ⌁ Skylink ${skylink} Blocked on ${server}"
echo "--------------------------------------------"