Started writing on a tape rotate function
This commit is contained in:
parent
abbf08c4c9
commit
6980822791
22
taperotate.sh
Executable file
22
taperotate.sh
Executable 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
|
Loading…
x
Reference in New Issue
Block a user