Tuesday, August 21, 2012

How do you convert all cvs files to text or change the extension of all files?

#!/bin/sh

for FILE in *.cvs
do
 #Strip off extension
 FNAME=`echo $FILE | awk -F . '{ print $1 }'`
 mv $FILE ${FNAME}.txt
done

No comments :