find-ext-and-archive.sh 192 B

12345
  1. #!/usr/bin/env bash
  2. set -euo pipefail # bash strict mode
  3. # find -type f -size -5M -exec tar cavf archive.tar.gz {} +
  4. find -type f -name "*.${@}$" -print0 | tar cavf archive.tar.gz --null -T -