Commit 7b2689b4 authored by Caleb Cooper's avatar Caleb Cooper
Browse files

Support for piping in strings.

parent feceac30
#! /bin/bash
set -pue
declare INPUT=${@}
declare INPUT=''
# Accept input from pipes.
while read -t 0.1 PIPE; do
INPUT="${INPUT}${PIPE}"
done
# If nothing has been piped in, try the positional parameters.
if [[ -z "${INPUT}" ]]; then
declare INPUT=${@}
fi
declare -a CHARS
declare -A CHARS_COUNT
......
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