Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
target_sample_rate="48000"
target_bit_depth="16"
sample_rate=$(soxi -r "$1")
bit_depth=$(soxi -b "$1")
if [ "$sample_rate" -le "$target_sample_rate" ] && [ "$bit_depth" -le "$target_bit_depth" ]; then
cp "$1" "$2"
else