[Linux]ファイルの英小文字を英大文字に変更する方法

2021年4月21日

書式
cat ファイル名 | tr 'a-z’ 'A-Z’
使用例
# cat example.txt
study skill in arkgame.com his is a test

方法1
# tr [:lower:] [:upper:] < example.txt
STUDY SKILL IN ARKGAME.COM HIS IS A TEST

方法2
# tr '[:lower:]’ '[:upper:]’ < example.txt
STUDY SKILL IN ARKGAME.COM HIS IS A TEST

方法3
# cat example.txt | tr 'a-z’ 'A-Z’
STUDY SKILL IN ARKGAME.COM HIS IS A TEST

Linux

Posted by arkgame