本文介绍了我可以使用awk将所有小写字母都转换为大写字母吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含小写字母和大写字母的文件,我可以使用awk将该文件中的所有字母都转换为大写吗?

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?

推荐答案

尝试一下:

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

使用文件:

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

这篇关于我可以使用awk将所有小写字母都转换为大写字母吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-15 08:29