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

后端 未结 6 1246
醉话见心
醉话见心 2020-12-29 01:38

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?

6条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-29 02:04

    Try this:

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

    Using a file:

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

提交回复
热议问题