Last active
August 10, 2021 16:24
-
-
Save toonetown/b75e5c37b2ebf891da16ddc5d812f983 to your computer and use it in GitHub Desktop.
Copies a file if it is different than the target
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Copies a file if and only if it is different | |
if [ "$(diff -q "${1}" "${2}" 2>&1 | wc -l)" -gt 0 ]; then cp "${1}" "${2}"; fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As of Parallels 17, it appears that this bug has been fixed!