Linux Command - Tr | Xing's Blog
Có thể bạn quan tâm
0%
Options
Examples
Reference
tr - Translate characters.
Translate, squeeze, and/or delete characters from standard input, writing to standard output.
Syntax| 1 | tr [OPTIONS] SET1 [SET2] |
| Common Option | Description |
|---|---|
| -c | use the complement of SET1 |
| -d | delete characters in the first set |
| -s | replace each input sequence of a repeated character that is listed in SET1 with a single occurrence of that character |
| -t | first truncate SET1 to length of SET2 |
Replace characters
| 1 | tr 'abc' 'DEF' < file1 |
Here we replace ‘a’ with ‘D’, ‘b’ with ‘E’ and ‘c’ with ‘F’.
Remove Characters
| 1 | tr -d 'ac' < file1 |
Remove character ‘a’ and ‘c’
Compress Characters
| 1 | tr -s '[:blank:]' < file1 |
Blanks will be compressed. e.g. ‘ab cd’ will become ‘ab cd’
Lower case to upper case
| 1 | tr '[:lower:]' '[:upper:]' < file1 |
- tr online man page
Từ khóa » Xing Tr
-
XING Istanbul
-
Türkiye IT | XING
-
XING - Your Business Network On The App Store
-
Zing - Thông Tin Uy Tín, Hình ảnh ấn Tượng
-
XING In English Translation - Tr-ex
-
Gundam TR-# - Customized Build Modeled By 模XING - Pinterest
-
Gundam TR-# - Customized Build Modeled By 模XING - Pinterest
-
TR/TPR Plastic Shoes Material
-
XING ZHOU In English Translation - Tr-ex