log can allow quotes and question marks

This commit is contained in:
James Tomasino 2018-12-30 14:12:47 -05:00
parent e7b2d20097
commit 93414f7109
1 changed files with 1 additions and 1 deletions

View File

@ -133,7 +133,7 @@ check_log () {
printf "\\n Title for message %s? " "$(basename "$u" | sed 's/\.[^.]*$//')"
read -r title
if [ ! -z "$title" ]; then
if printf "%s" "$title" | grep -Eq "^[A-Za-z0-9]+[A-Za-z0-9\\.\\ \\-]*$"; then
if printf "%s" "$title" | grep -Eq "^[A-Za-z0-9]+[A-Za-z0-9\\?'\"\\,\\.\\ \\-]*$"; then
printf "0%s - %s\\t%s\\n" "$ship" "$title" "$u" | cat - /var/gopher/listing.gophermap > "$tmp" && cat "$tmp" > /var/gopher/listing.gophermap && rm "$tmp"
printf "\\n %s - %s .... Sent.\\n" "$(basename "$u" | sed 's/\.[^.]*$//')" "$title"
else