diff options
author | Stefan Ritter <gideonstar@thehappy.de> | 2009-08-26 09:59:21 +0200 |
---|---|---|
committer | Stefan Ritter <gideonstar@thehappy.de> | 2009-08-26 09:59:21 +0200 |
commit | f137fb40632db4000e06d1eaab931cd8034cb18d (patch) | |
tree | bc8a43b3c98d6a742bfc810db745f49d7fc1b69e /viod | |
parent | cd023e658f4ff5a5087b53d15d28628ac44827d8 (diff) |
Weekly update
Diffstat (limited to 'viod')
-rwxr-xr-x | viod | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -0,0 +1,17 @@ +#!/bin/bash + +editor=vi + +if [ $# -eq 0 ] +then + echo "usage: `basename $0` file" + exit 1 +fi + +file=$1 + +timestamp=`stat -c %y "$file" | cut -d. -f1 | cut -d" " -f1 | awk -F- '{print $1 $2 $3}'``stat -c %y "$file" | cut -d. -f1 | cut -d" " -f2 | awk -F: '{print $1 $2 "." $3}'` + +"$editor" "$file" + +touch -t $timestamp "$file" |