Code Demo · Bash · Safe Pipeline

bash
#!/usr/bin/env bash
set -euo pipefail

printf '%s\n' "debug" "share" "inspect" "debug" \
  | sort \
  | uniq -c \
  | sed 's/^ *//'
131 characters7 lines< 393 B