You can also use Perl 5:
perl -pe '$_=lc' temp
-p tells perl to run the specified expression once for each line of input, printing the result, i.e. the final value of
-e indicates that the program will be the next argument, as opposed to a file containing the script.
lc converts to lowercase. Without an argument, it will operate on
$_= saves that again so it will get printed.
A variation of that would be
perl -ne 'print lc' temp
-n is like
-p except that
$_ won't get printed in the end. So instead of saving to that variable, I'm including an explicit print statement.
One benefit of Perl in contrast to sed is that you don't need any GNU extensions. There are projects which have to be compatible with non-GNU environments but which also already have Perl a s a dependency. Compared with
tr, it might be that Perl
lc can be more easily made locale-aware. See the
perllocale man page for details.