Hi Gurus,
I have file name like:
abcd.20131005.dat
I need to remove mid part of data
final name should be
abcd.dat
thanks in advance
Hi Gurus,
I have file name like:
abcd.20131005.dat
I need to remove mid part of data
final name should be
abcd.dat
thanks in advance
mv `ls *.dat` `ls *.dat | cut -d"." -f1,3`
Parameter Expansion, read all about it in the manpage for your shell.
filename=abcd.20131005.dat
suf=${filename##*.}
filename=${filename%%.*}.$suf
echo $filename
abcd.dat