forked from cosmic/cosmic
need to sort before uniq
This commit is contained in:
parent
3a8b6976e7
commit
3663a067cf
|
@ -30,7 +30,7 @@ check_log () {
|
|||
# store list of unpublished logs
|
||||
logs=$(grep "^0${ship}" "/var/gopher/listing.gophermap" | awk -F'\t' '{print $2}')
|
||||
files=$(find "/var/gopher/$ship" -not -path '*/\.*' -type f | sed 's|/var/gopher||')
|
||||
uniq=$(printf "%s\\n%s" "$logs" "$files" | uniq -u)
|
||||
uniq=$(printf "%s\\n%s" "$logs" "$files" | sort | uniq -u)
|
||||
|
||||
if [ -z "$uniq" ]; then
|
||||
printf " .... No messages.\\n"
|
||||
|
|
Loading…
Reference in New Issue