Quote:
Originally posted by Dahn
read answer
answer=$(cat $answer | tr '[A-Z]' '[a-z]')
when ever I run this I get an error message that tells me the contents of $answer is not a valid file.
Any help would be appreciated.
|
'cat' is expecting a filename as an argument - use 'echo'. You could also use 'typeset -u' to decalre a variable as uppercase text.
e.g.
typeset -u answer=$answer
Beware of scope when using this method as for example, variables declared in functions will only be set within that function.