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

 訪問手機(jī)版  

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

招聘|合作 登陸|注冊(cè)

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

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

Linux常用命令之tr

時(shí)間:2019-08-17

tr%20[OPTION]...%20SET1%20[SET2]

Translatelinux常用命令,%20squeeze,%20and/or%20delete%20characters%20from%20standard%20input,writing%20to%20standard%20output.

str="hello world"
# hello world
echo ${str}
# AAllAAAAAlA
echo ${str} | tr -c 'll\n' 'A'
# hello-world
echo ${str} | tr -c 'a-z\n' '-'
# hello-world
echo ${str} | tr -C 'a-z\n' '-'
str="hello world"
# hello world
echo ${str}
# helloworld
echo ${str} | tr -d ' '
# he wrd
echo ${str} | tr -d 'llo'

linux常用命令_linux命令中的head命令_常用dos命令大全

str="thissss is      a text linnnnnnne."
# thissss is a text linnnnnnne.
echo ${str}
# this is a text line.
echo ${str} | tr -s ' sn'
str="hello world"
# hello world
echo ${str}
# heaao worad
echo ${str} | tr -t 'l' 'a'
# hello-world
echo ${str} | tr -t ' ' '-'

linux常用命令_常用dos命令大全_linux命令中的head命令

SETs are specified as strings of characters. Most represent

themselves. Interpreted sequences are:

linux命令中的head命令_常用dos命令大全_linux常用命令

\NNN   character with octal value NNN (1 to 3 octal digits)
\\     backslash
\a     audible BEL
\b     backspace
\f     form feed
\n     new line
\r     return
\t     horizontal tab
\v     vertical tab
CHAR1-CHAR2
        all characters from CHAR1 to CHAR2 in ascending order
[CHAR*]
        in SET2, copies of CHAR until length of SET1
[CHAR*REPEAT]
        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
[:print:]
        all printable characters, including space
[:punct:]
        all punctuation characters
[:space:]
        all horizontal or vertical whitespace
[:upper:]
        all upper case letters
[:xdigit:]
        all hexadecimal digits
[=CHAR=]
        all characters which are equivalent to CHAR
 上一個(gè)教程:getsebool命令詳解