18 lines
No EOL
417 B
Bash
18 lines
No EOL
417 B
Bash
#!/bin/bash
|
|
|
|
case $1 in
|
|
"list")
|
|
echo "=> /create Create new entry"
|
|
cat /app/cmd/entries.log.gmi
|
|
;;
|
|
"create")
|
|
echo "" >> /app/cmd/entries.log.gmi
|
|
date=$(date -u +"%Y-%m-%d %H:%M %Z")
|
|
echo "## $date" >> /app/cmd/entries.log.gmi
|
|
while IFS= read -r line; do
|
|
echo $line >> /app/cmd/entries.log.gmi
|
|
done
|
|
echo "Entry created."
|
|
echo "=> / Back to the log entries"
|
|
;;
|
|
esac |