2020-06-01 15:02:43 +00:00
|
|
|
#!/bin/bash
|
|
|
|
FILE=/tmp/$RANDOM
|
2021-01-05 18:27:13 +00:00
|
|
|
TOP=54
|
2020-06-11 15:54:10 +00:00
|
|
|
NEXTFIELD=5
|
2021-01-05 18:27:13 +00:00
|
|
|
LEFT=23
|
|
|
|
AUTHLEFT=66
|
|
|
|
DATELEFT=35
|
2020-06-11 15:54:10 +00:00
|
|
|
MAXLENGTH=17
|
2020-06-01 15:02:43 +00:00
|
|
|
|
|
|
|
GIVENNAME=$1
|
|
|
|
SURNAME=$2
|
|
|
|
HOME=$3
|
|
|
|
|
|
|
|
|
|
|
|
if [ ${#GIVENNAME} -gt $MAXLENGTH ] || [ ${#SURNAME} -gt $MAXLENGTH ] || [ ${#HOME} -gt $MAXLENGTH ]; then
|
|
|
|
echo "MAXLENGTH EXCEEDED."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
source ../include/nixdorf
|
|
|
|
init
|
2020-06-11 15:54:10 +00:00
|
|
|
smallLetters $FILE
|
|
|
|
printf "\x1b\x33\x0e" >> $FILE
|
2020-06-11 10:13:23 +00:00
|
|
|
makeNewline $TOP $FILE
|
|
|
|
makeLeft $LEFT $FILE
|
2020-06-01 15:02:43 +00:00
|
|
|
printf "$GIVENNAME" >> $FILE
|
|
|
|
|
2020-06-11 15:54:10 +00:00
|
|
|
# Authority field
|
|
|
|
makeNewline 2 $FILE
|
|
|
|
makeLeft $AUTHLEFT $FILE
|
2021-01-05 18:27:13 +00:00
|
|
|
printf "C3Reg" >> $FILE
|
2020-06-11 15:54:10 +00:00
|
|
|
|
|
|
|
makeNewline 3 $FILE
|
2020-06-11 10:13:23 +00:00
|
|
|
makeLeft $LEFT $FILE
|
2020-06-01 15:02:43 +00:00
|
|
|
printf "$SURNAME" >> $FILE
|
|
|
|
|
2020-06-11 15:54:10 +00:00
|
|
|
makeNewline $NEXTFIELD $FILE
|
2020-06-11 10:13:23 +00:00
|
|
|
makeLeft $LEFT $FILE
|
2020-06-01 15:02:43 +00:00
|
|
|
printf "$HOME" >> $FILE
|
|
|
|
|
2021-01-05 18:27:13 +00:00
|
|
|
makeNewline 5 $FILE
|
2020-06-11 15:54:10 +00:00
|
|
|
makeLeft $DATELEFT $FILE
|
2020-06-01 15:02:43 +00:00
|
|
|
|
|
|
|
if [ -n "$EVENT" ]; then
|
2020-06-11 15:54:10 +00:00
|
|
|
printf "/ $EVENT, $(date -I)" >> $FILE
|
2020-06-01 15:02:43 +00:00
|
|
|
else
|
2020-06-11 15:54:10 +00:00
|
|
|
printf "/ $(date -I)" >> $FILE
|
2020-06-01 15:02:43 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
printFile $FILE
|
|
|
|
rm $FILE
|