#!/bin/bash
# usage:
#   files-moveno2nd "*.ext1" ext2 directory
#
# move all files from (*.ext1) where there is no
# supplementary file with other extension ext2 
# (e.g. calibration file or bitmap file)

if [ $# -ne 3 ]; then
  echo "usage: files-moveno2nd \"*.ext1\" ext2 directory"
  exit
fi

hash files-moveno2nd1

find . -maxdepth 1 -name "$1" -print0 | xargs -0 -I '{}' files-moveno2nd1 "{}" "$2" "$3"
