Add simple pluralize wrapper for bash output

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2018-08-19 11:49:54 +02:00
parent d9752cb7d4
commit cff10f74a2
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

8
bin/pluralize Executable file
View file

@ -0,0 +1,8 @@
#!/bin/bash
set -eo pipefail
if [ $2 -eq 1 -o $2 -eq -1 ]; then
echo ${1}
else
echo ${1}s
fi