timekeeper script

From chytrex, 9 Years ago, written in Plain Text, viewed 179 times.
URL http://minetest.wjake.com/stikked/view/c6eb2d78 Embed
Download Paste or View Raw
  1. #!/bin/bash
  2.  
  3. SOUBOR="$1"
  4. SOUBOR=`pwd`/$SOUBOR
  5.  
  6.  
  7. if [ -e "$SOUBOR" ]; then
  8.         CAS=`stat -c %Y $SOUBOR`
  9.         TOUCHDATE=`date -d "@"$CAS +"%y%m%d%H%M.%S"`
  10.         read -p "Modify your file and press any key when done to restore its timestamp... " -n1 -s
  11.         touch -t $TOUCHDATE $SOUBOR
  12.         echo
  13.         exit 0
  14. fi
  15. echo "Please specify filename you want to keep its timestamp"
  16. exit 1
  17.  

Reply to "timekeeper script"

Here you can reply to the paste above