How to obtain the first letter in a Bash variable?
initial="$(echo $word | head -c 1)"
Every time you say "first" in your problem description, head
is a likely solution.
initial="$(echo $word | head -c 1)"
Every time you say "first" in your problem description, head
is a likely solution.