Skip to content

Commit

Permalink
Pipe newline-terminated strings to sort
Browse files Browse the repository at this point in the history
Squashes `sort: missing NEWLINE added at end of input file STDIN` on
OmniOSce and presumably other Solaris-like sort(1) implementations.
  • Loading branch information
strugee committed Oct 14, 2018
1 parent e285af5 commit 501f3a7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions filter-other-days
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ SHORT_MONTHS=$(echo "$FULL_MONTHS" | cut -c -3)

FULL_DAYS=$(seq 31 | sed 's/^/0/g' | sed 's/0\(..\)/\1/g')
DAYS=$(seq 31)
ALL_DAYS=$(printf "$FULL_DAYS\n$DAYS" | sort | uniq)
ALL_DAYS=$(printf "$FULL_DAYS\n$DAYS\n" | sort | uniq)

# Current values

Expand All @@ -175,7 +175,7 @@ OTHER_SHORT_MONTHS=$(echo "$SHORT_MONTHS" | grep -Fxv $NOW_SHORT_MONTH)
OTHER_FULL_MONTHS=$(echo "$FULL_MONTHS" | grep -Fxv $NOW_FULL_MONTH)
OTHER_DAYS=$(echo "$DAYS" | grep -Fxv $NOW_DAY)
OTHER_FULL_DAYS=$(echo "$FULL_DAYS" | grep -Fxv $NOW_FULL_DAY)
OTHER_ALL_DAYS=$(printf "$OTHER_FULL_DAYS\n$OTHER_DAYS" | sort | uniq)
OTHER_ALL_DAYS=$(printf "$OTHER_FULL_DAYS\n$OTHER_DAYS\n" | sort | uniq)

# Built regexps

Expand Down

0 comments on commit 501f3a7

Please sign in to comment.