Started writing on a tape rotate function

This commit is contained in:
Jack-Benny Persson 2013-12-18 15:40:13 +01:00
parent abbf08c4c9
commit 6980822791

22
taperotate.sh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/bash
# Jack-Benny Persson
# LX13
# Rotate tapes
TapeFile=tape.txt
Tape=`tail -n1 $TapeFile | awk '{ print $5 }'`
HowMany=6
TimeStamp=`date "+%F %X --> "`
if [ $Tape -ge $HowMany ]; then
Tape=0
fi
Tape=$((Tape+1))
printf "$TimeStamp Tape $Tape\n"
exit 0