[root@localhost demo]# w 08:59:43 up 11 min, 1 user, load average: 0.00, 0.01, 0.01 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT root pts/0 192.168.0.105 08:48 7.00s 0.09s 0.01s w [root@localhost demo]# who root pts/0 2025-01-07 08:48 (192.168.0.105) [root@localhost demo]# echo "my name is llall" | tr '[a-z]' '[A-Z]' MY NAME IS LLALL [root@localhost demo]# echo "my name is llall my age 2323" | tr -d '[a-z]' 2323 [root@localhost demo]# echo "my name is llall my age 2323" | tr -d 'a' my nme is llll my ge 2323 [root@localhost demo]# echo "my name is llall my age 2323" | tr -d '0-9' my name is llall my age [root@localhost demo]# tr 'a' 'A' <alex.txt my nAme is Alex. he love linux. he like eAt Apple. [root@localhost demo]# cat alex.txt my name is alex. he love linux. he like eat apple. [root@localhost demo]# echo "my nameeeee issss hahahha" | tr -s 'esh' my name is hahaha
标签:2323,demo,tr,命令,root,my,localhost From: https://www.cnblogs.com/wmqxlt/p/18656739