Added viod again
This commit is contained in:
parent
7757404ca5
commit
8150e9449c
1 changed files with 17 additions and 0 deletions
17
viod
Executable file
17
viod
Executable file
|
@ -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"
|
Loading…
Add table
Reference in a new issue