Case insentitive basename
Published: Wednesday, Dec 26, 2007 Last modified: Thursday, Nov 14, 2024
Better than basename:
file=mvi_0288.avi; echo ${file%.*}
mvi_0288
Lets do extensions too:
#!/bin/bash
for i in $@
do
EXT=${i##*.}
if [ $EXT = 'iso' ] || [ $EXT = 'img' ]; then
md5sum $i > $i.MD5SUM
fi
done
Make a change