Created
April 15, 2014 16:09
-
-
Save 6LYTH3/10744440 to your computer and use it in GitHub Desktop.
Update ET
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PATHDATA="/home/administrator/Data/" | |
RAWDATA=`ls -rtl --time-style=+"%d-%b-%y:%H:%M:%S" $PATHDATA | sed 1d | awk '{print $6, $NF}'` | |
for rawdata in $RAWDATA; | |
do | |
CHECK=`echo ${rawdata} | awk -F"." '{print $2}'` | |
if [ -z $CHECK ] | |
then | |
RAW=$rawdata | |
else | |
sed "s/[0-9]*-\(.*:\)[0-9]*:[0-9]*:[0-9]*/${RAW}/g" ${PATHDATA}${rawdata} > t | mv t ${PATHDATA}${rawdata} | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment