Adding date suffix in a file by using shell script mentioned syntax...
current_time=`date '+%Y%m%d'` // get date in yyyymmdd format
index=`echo "${#i}-4" | bc` // here i is variable contains file name
fileName=${i:0:$index} // adding defined index
extension=${i:$index}
echo $extension // printing extension
current_time=`date '+%Y%m%d'` // get date in yyyymmdd format
index=`echo "${#i}-4" | bc` // here i is variable contains file name
fileName=${i:0:$index} // adding defined index
extension=${i:$index}
echo $extension // printing extension
No comments:
Post a Comment