trying to strip the first 4 char. of a file out via commandline

im kind alost. i beleave its a sed command. but i cant seem to find it in my book. can someone point me in the write direction.

i know this is extreamly sloppy. but this is what i did untill i can figure out how to manipulate the filename namespace.

an ls on the directory where this would run would return 2 file names:

q162944.001
q162945.001


for i in `ls | awk -F"." '{ print $1 }'|awk -F"2" '{ print $2 }'`; do
                mv q162$i.* HBFULR$i`date +%Y%m%d%H%M%S`.DAT
                done

How about this:

#!/bin/ksh
for file in *
do
 newname=`echo $i | sed 's/^....//'`
 mv $file HBFULR${newname}`date +%Y%m%d%H%M%S`.dat
done

A little simpler...

thank ya once again.

yeah i really need to brush up o learn some sed.

thanks for the pointers tho.