mount: block device /dev/hdc is writing protected;mounting read-only
#!/bin/bash
#
# Convert Nero .nrg format to .iso format.
error()
{
echo "${@}" >&2
exit 1
}
INPUT="${1}"; OUTPUT="${2}"
[ -z "${OUTPUT}" ] && OUTPUT="${INPUT%.*}.iso"
[ ${#} -ne 1 -a ${#} -ne 2 ] &&
error "Usage: $(basename ${0}) file.nrg [file.iso]"
[ ! -e "${INPUT}" ] && error "${INPUT}: file does not exist"
[ ! -s "${INPUT}" ] && error "${INPUT}: file is null"
TYPE=$(file -b "${INPUT}"); TYPE="${TYPE%% *}"
[ "${TYPE}" = "ISO" ] && error "${INPUT}: file is already in .iso format"
[ "${TYPE}" != "data" ] && error "${INPUT}: file is not in .nrg format"
dd if="${INPUT}" of="${OUTPUT}" bs=1024 skip=300
Ricardo Rabelo Mota
Site Católico Nossa Senhora Rosa Mística
http://www.rosamistica.org