Commit 35b17ac1 authored by Vitaly Lipatov's avatar Vitaly Lipatov

estrlist: add count method, fix --help

parent 82adfb3a
......@@ -46,6 +46,11 @@ list()
done
}
count()
{
list $@ | wc -l
}
union()
{
list $@ | sort -u
......@@ -100,7 +105,7 @@ reg_include()
}
--help()
help()
{
echo "estrlist developed for string list operations. See also cut, join, paste..."
echo "Usage: $0 <command> [args]"
......@@ -126,5 +131,9 @@ if [ -z "$COMMAND" ] ; then
exit 1
fi
if [ "$COMMAND" = "-h" ] || [ "$COMMAND" = "--help" ] ; then
COMMAND="help"
fi
shift
"$COMMAND" "$@"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment