中文字幕亚洲第一精品|精品国产免费一区二区|久久婷婷五月六月综合版|中文字幕熟妇久久久人妻|久久综合精品国产一区无码|国产成人精品永久免费视频|午夜亚洲国产精品理论片a级|久久精品一区二区三区无码护土

 訪問手機(jī)版  

Linux常用命令|Linux培訓(xùn)學(xué)習(xí)|考試認(rèn)證|工資待遇與招聘,認(rèn)準(zhǔn)超級網(wǎng)工!

招聘|合作 登陸|注冊

網(wǎng)絡(luò)工程師培訓(xùn)

當(dāng)前位置:網(wǎng)絡(luò)工程師 > 技術(shù)課程 > linux > 熱點(diǎn)關(guān)注 > linux常用命令

linux命令總結(jié)之tr命令

時間:2018-10-02

linux最常用的20個命令_linux基本命令大全_linux命令

什么是tr命令?tr,translate的簡寫,translate的翻譯:

[tr?ns?leit]

vi. 翻譯, 能被譯出

vt. 翻譯, 解釋, 轉(zhuǎn)化, 轉(zhuǎn)變?yōu)? 調(diào)動

在這里用到的意思是轉(zhuǎn)化,轉(zhuǎn)變,轉(zhuǎn)換,在linux下輸入tr --help查看一下提示:

amosli@amosli-pc:~$ tr --help

Usage: tr [OPTION]... SE××× [SET2]

Translate, squeeze, and/or delete characters from standard input,

writing to standard output.

-c, -C, --complement use the complement of SE×××

-d, --deletedelete characters in SE×××, do not translate

-s, --squeeze-repeats replace each input sequence of a repeated character

that is listed in SE××× with a single occurrence

of that character

-t, --truncate-set1first truncate SE××× to length of SET2

--helpdisplay this help and exit

--version output version information and exit

SETs are specified as strings of characters. Most represent themselves.

Interpreted sequences are:

\NNNcharacter with octal value NNN (1 to 3 octal digits)

\backslash

\aaudible BEL

\bbackspace

\fform feed

\nnew line

\rreturn

\thorizontal tab

\vvertical tab

CHAR1-CHAR2all characters from CHAR1 to CHAR2 in ascending order

[CHAR]in SET2, copies of CHAR until length of SE×××

[CHARREPEAT] REPEAT copies of CHAR, REPEAT octal if starting with 0

[:alnum:]all letters and digits

[:alpha:]all letters

[:blank:]all horizontal whitespace

[:cntrl:]all control characters

[:digit:]all digits

[:graph:]all printable characters, not including space

[:lower:]all lower case letters

replace unsafe characters with their escape sequences. unsafe characters are those characters that may be altered during transport across the internet, and include the (<, >, ", #, {, }, |, \, ^, ~, [, ], and ') characters. this flag applies to all urls, including opaque urls.。