将字符串转换为小写

AWK 经常用于处理包含字符串列表的整个文件。假设文件 awk_test_file.txt 包含:

 placeholderCopyFirst String
Second String
Third String

要将所有字符串转换为小写,请执行:

 placeholderCopyawk '{ print tolower($0) }' awk_test_file.txt

这将导致:

 placeholderCopyfirst string
second string
third string