for file in prefix-* ; do mv "$file" "${file##prefix-}" done
Almost correct. What happens if one of the files is named "prefix-prefix-1"? What about "prefix-"?
I suggest:
for file in prefix-?* do mv "$file" "${file#prefix-}" done
--
Jeff Woods
"Errors creep into everything, and the only way to expunge them is to have any bit of work reviewed by a few others." -- Wirt Atmar, 10-27-2001
"The great thing about Open Source software is that you can have any color screen of death that you want." -- Gavin Scott, 08-22-2000
- : send the line "unsubscribe linux-admin" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html