#!/bin/bash for i in *.CAP; do x=`echo "$i"|sed -e 's/.CAP/.ROM/'` dd bs=2048 skip=1 if=$i of=$x done