I have a bunch of files as follows:
04602635_b0294.DAT20120807164534
04602637_b0297.DAT20120807164713
04602638_b0296.DAT20120807164637
04602639_b0299.DAT20120807164819
04602640_b0298.DAT20120807164748
04602641_b0300.DAT20120807164849
04602650_b0301.DAT20120807164921
04602652_b0302.DAT20120807164956
I need to rename them to exclude the prefix. It needs to look like this..
b0294.DAT20120807164534
b0297.DAT20120807164713
b0296.DAT20120807164637
b0299.DAT20120807164819
b0298.DAT20120807164748
b0300.DAT20120807164849
b0301.DAT20120807164921
b0302.DAT20120807164956
EDIT
I forgot to add that I am using Solaris.
"${file#*_}"
? – Pieter van Niekerk Aug 10 '12 at 13:23echo
, just pipe the script output intobash
. – Jim L. May 29 '19 at 16:19