Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Renaming a filename

$
0
0
Hi friends ,

i want to change the filename as below

Code:


filename=ABC_HYND_JDHD_20130125120345.txt

Code:

expected output : ABC_HYND_JDHD_20130125.txt

i have tried using awk but not able to procedd futher. i am trying to do the above in single commad.

Code:


echo "ABC_HYND_JDHD_20130125120345.txt" | awk -F"." '{ x=$1;y=$2}'


plz help

Viewing all articles
Browse latest Browse all 16232

Latest Images

Trending Articles



Latest Images