Skip to content
Snippets Groups Projects
Commit 7bc5ccaf authored by nimrod's avatar nimrod
Browse files

- TIL don't use xargs when you don't have to.

parent 62c5fe88
No related branches found
No related tags found
No related merge requests found
...@@ -150,7 +150,7 @@ sync_comics () { ...@@ -150,7 +150,7 @@ sync_comics () {
this_month="$( date '+xbmc.shore.co.il:/srv/library/Comics/0-Day\ Week\ of\ %Y.%m.*' )" this_month="$( date '+xbmc.shore.co.il:/srv/library/Comics/0-Day\ Week\ of\ %Y.%m.*' )"
last_month="$( date --date '1 month ago' '+xbmc.shore.co.il:/srv/library/Comics/0-Day\ Week\ of\ %Y.%m.*' )" last_month="$( date --date '1 month ago' '+xbmc.shore.co.il:/srv/library/Comics/0-Day\ Week\ of\ %Y.%m.*' )"
rsync --prune-empty-dirs --ignore-missing-args --recursive --compress --progress --exclude "*.part" "$last_month" "$this_month" "$HOME/Downloads/Comics/" rsync --prune-empty-dirs --ignore-missing-args --recursive --compress --progress --exclude "*.part" "$last_month" "$this_month" "$HOME/Downloads/Comics/"
find "$HOME/Downloads/Comics/" -name "$(date --date '2 month ago' +'0-Day\ Week\ of\ %Y.%m.*')" -print0 | xargs -r0 rm -r find "$HOME/Downloads/Comics/" -name "$(date --date '2 month ago' +'0-Day\ Week\ of\ %Y.%m.*')" -exec rm -r {} +
} }
bfg () { bfg () {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment