arfoll / unrarall

bash script to unrar everything and cleanup in a given directory
GNU General Public License v3.0
261 stars 68 forks source link

unrarall: hide unnecessary mv output in alpine #52

Closed callumgare closed 2 years ago

callumgare commented 4 years ago

Some versions of mv print help output to stderr rather than stdout. This breaks the check to see if mv supports --backup and also prints help text to the console. If we pipe stderr to stdin that should make unrarall more platform independent.

You can check the different behavior of mv with:

docker run --rm -it ubuntu bash -c 'mv --help 1>/dev/null' # doesn't print any output
docker run --rm -it alpine ash -c 'mv --help 1>/dev/null' # prints output