#!/bin/tcsh -f #H# Converts *.avi in the current dir to *.mkv and deletes the avi files unless there #H# is an error. #H# There are no parameters to this script. # print usage info if needed if ($1 != "") exec sed -n -e '/^\#H\#/s/^....//p' $0 foreach f (*.avi) set FN=`basename "$f" .avi` mkvmerge -o "${FN}.mkv" "${FN}.avi" && rm -v "${FN}.avi" || echo "Problem converting." end