Yishu Fang Yishu Fang - 1 year ago 153
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

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

Answer Source

Try this:

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

Using a file:

awk '{ print toupper($0) }' yourfile.txt
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download