diff options
author | Jonas Smedegaard <dr@jones.dk> | 2017-05-07 00:52:54 +0200 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2017-05-07 00:52:54 +0200 |
commit | 3da59131e3e74d493c9e28589d79569a3dad668d (patch) | |
tree | 4a8ce0d9119a99425fa7de020c59a22c43033526 /bin | |
parent | 0d01c144a85c59fdf2cd0fe7bd93c346b0c6f438 (diff) |
Tidy variable HEIGHTS: Generalize function uniqwords.
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/stream | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -93,8 +93,11 @@ printf_each() { printf "$skel" "$string" done } +uniqwords() { + echo "$@" | tr ' ' '\012' | sort -u +} -HEIGHTS=$(echo "$HEIGHTS_WEBM $HEIGHTS_MPEG" | tr ' ' '\012' | sort -u) +HEIGHTS=$(uniqwords "$HEIGHTS_WEBM $HEIGHTS_MPEG") HEIGHTCOUNT=$(echo "$HEIGHTS" | wc --words) # FIXME: support multiple heights |