From 8150e9449ca00c937c2ba7570c3407d28d03128e Mon Sep 17 00:00:00 2001 From: Stefan Ritter Date: Mon, 23 Nov 2009 08:35:59 +0100 Subject: Added viod again --- viod | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 viod diff --git a/viod b/viod new file mode 100755 index 0000000..8bb4c21 --- /dev/null +++ b/viod @@ -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" -- cgit v1.2.3