#!/bin/bash for i in *.s3m; do xxd -p "$i" > "$i"txt_t ; done for i in *.s3mtxt_t; do dd if="$i" of="$i".s3mtxt conv=ucase ; done for i in *.s3mtxt_t; do rm "$i" ; done