gen_index.sh 314 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#!/bin/sh


for i in $*
do
    EXT=""
    case "$i" in
	*.mlw)
	    EXT=".mlw"
	    ;;
	*.why)
	    EXT=".why"
	    ;;
	*)
15
	    echo "Warning: unknown extension for file $i" >&2;
16 17 18 19 20 21 22
	    continue
	    ;;
    esac
    B=$(basename "$i" "$EXT" | tr _ ' ' |  sed -e 's/\b\(.\)/\u\1/g');
    echo "$B"
    echo "$i"
done