my old program is using cut to get the date of the file such:
for FILE in ATK*
do
file_year=$(echo $FILE| cut -c 13-16)
file_month=$(echo $FILE|cut -c 13-18)
###
echo $file_month --->just as example!
done
where filename is such:
ATK_7B1_WIP_20041116160700.1.xml.dsc
ATK_7B1_WIP_20041116160700.2.xml.dsc
ATK_7B1_WIP_20041116160700.3.xml.dsc
ATK_7B1_WIP_20041116160700.4.xml.dsc
problem is how can i enhance it to all filename?
such:
AIT_7B1_WIP_20050101010101.dsc
ASECL_7B1_WIP_20041209151027.xml.dsc
ASEKR_7B1_WIP_20050101020202.dsc
so i cant use the ' for FILE in ATK* ' rite?
should replace with what?
all the filename will be the same unless the front name:
xxxx_7B1_WIP_20041116160700xxx
help!!!