I have this script to read a file from a directory,
for FILE in `ls -1 ../dir` ;do
echo Renaming $FILE
with a filename TRO029274465.txt now i want to rename this file to a certain string found inside this textfile.
For example this
TRO029274465.txt contains
H20090812982009081211021025301000000012689925
T200908129820000105700668330000000126899250000000214600004
...
i want to get the string in 9-16
"9820090812"
so that my new file name would be 20090812.98
Been trying on some commands but it seems that i dont get the right format for this one.
pls help. I'm a linux newbie
Thanks,
-dying octupos