44 lines
653 B
Bash
Executable File
44 lines
653 B
Bash
Executable File
#!/bin/bash
|
|
FILE=/tmp/$RANDOM
|
|
TOP=7
|
|
LEFT=2
|
|
MAXLENGTH=25
|
|
|
|
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
|
|
|
|
makeNewline $TOP $FILE
|
|
makeLeft $LEFT $FILE
|
|
printf "$GIVENNAME" >> $FILE
|
|
|
|
makeNewline 4 $FILE
|
|
makeLeft $LEFT $FILE
|
|
printf "$SURNAME" >> $FILE
|
|
|
|
makeNewline 3 $FILE
|
|
makeLeft $LEFT $FILE
|
|
printf "$HOME" >> $FILE
|
|
|
|
makeNewline 4 $FILE
|
|
makeLeft $LEFT $FILE
|
|
|
|
if [ -n "$EVENT" ]; then
|
|
printf "$EVENT, $(date -I)" >> $FILE
|
|
else
|
|
printf "$(date -I)" >> $FILE
|
|
fi
|
|
|
|
printFile $FILE
|
|
rm $FILE
|