hi Im trying to make the 'response' return the answer in the form of a dash (-) rather than the actuall letters of a given word typed in, this is what i have tried, but im not getting the dashes come through just a blank screen, any ideas guys?
function enterWord () {
echo "select to be player 1 or 2"
read player
echo "player $player enter a word"
read response
clear
}
function readResponse () {
echo "$response | tr [a-zA-Z][_]"
}
enterWord
resp=$(readResponse)
echo "player $player your word was $resp"