Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/oracle/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux bash脚本将输入文件中的每个字符串小写,并将结果输出到新文件_Linux_Bash - Fatal编程技术网

Linux bash脚本将输入文件中的每个字符串小写,并将结果输出到新文件

Linux bash脚本将输入文件中的每个字符串小写,并将结果输出到新文件,linux,bash,Linux,Bash,如何将文本文件中的所有内容小写,然后将结果输出到bash脚本中的新文件?例如,输入文件包含 a bC D E A. 卑诗省 D E 输出 a bc d e A. 卑诗省 D E 使用tr命令: tr '[:upper:]' '[:lower:]' < infile > outfile tr'[:upper:]['[:lower:]['outfile 使用tr命令: tr '[:upper:]' '[:lower:]' < infile > outfile tr'[:u

如何将文本文件中的所有内容小写,然后将结果输出到bash脚本中的新文件?例如,输入文件包含

a bC D E A. 卑诗省 D E 输出

a bc d e A. 卑诗省 D E
使用
tr
命令:

tr '[:upper:]' '[:lower:]' < infile > outfile
tr'[:upper:]['[:lower:]['outfile

使用
tr
命令:

tr '[:upper:]' '[:lower:]' < infile > outfile
tr'[:upper:]['[:lower:]['outfile

另请参见:另请参见:更好:
”[:上:”[:下:”
更好:
“[:上:”[:下:”