Yishu Fang Yishu Fang - 6 months ago 15
Linux Question

Can I use awk to convert all the lower-case letters into upper-case?

I have a file mixed with lower-case letters and upper-case letters, can I use

awk
to convert all the letters in that file into upper-case?

Answer

Try this:

awk '{ print toupper($0) }' <<< "your string"

Using a file:

awk '{ print toupper($0) }' yourfile.txt