diff options
author | Stefan Ritter <xeno@thehappy.de> | 2009-11-26 23:22:30 +0100 |
---|---|---|
committer | Stefan Ritter <xeno@thehappy.de> | 2009-11-26 23:22:30 +0100 |
commit | 55de9381126e877eb54bcd06673e835e35e11c7d (patch) | |
tree | ef28dfa5fffeca33fc3942949c1841f243d9a709 | |
parent | 9fbf3a1cc0a1d2bfb1a4818ea88c190868881f97 (diff) | |
parent | 8150e9449ca00c937c2ba7570c3407d28d03128e (diff) |
Merge branch 'master' of fucktheforce.de:xeno
-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" |