View Single Post
Old 16th June 2006, 06:51
g33k g33k is offline
Junior Member
Join Date: Jun 2006
Location: India
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to g33k Send a message via Yahoo to g33k

>> so i need for each unique key (there are more then one) the news file will remain

I don't get what exactly you want to do..May be you could have been more clear !!

Well the following script extracts each field (key and date-time) from the file name..

ext=".3gp"	#put the file extension here

for f in *.3gp	#repeats of for each file in the directory	
	#extract the filename without extension
	base=`basename $f $ext`
	echo $base
	#extract the prefix
	pref=`echo $base | cut -c 5-13 -`
	echo $pref

	#extract date and time
	dtime=`echo $base | cut -c 14-25 -`
	echo $dtime
Reply With Quote