TR(1) Cac cau l>nh TR(1)
TEN
tr - translate or delete characters
TOM T>T
tr [OPTION]... STRING1 [STRING2]
MO T>
Translate, squeeze, and/or delete characters from standard input,
writing to standard output. STRING1 and STRING2 specify arrays of
characters ARRAY1 and ARRAY2 that control the action.
-c, -C, --complement
use the complement of ARRAY1
-d, --delete
delete characters in ARRAY1, do not translate
-s, --squeeze-repeats
replace each sequence of a repeated character that is listed in
the last specified ARRAY, with a single occurrence of that
character
-t, --truncate-set1
first truncate ARRAY1 to length of ARRAY2
--help hi>n th> tr> giup nay r>i thoat
--version
dua ra thong tin phien b>n r>i thoat
ARRAYs are specified as strings of characters. Most represent
themselves. Interpreted sequences are:
\NNN ky t> v>i gia tr> bat phan NNN (1 t>i 3 ch> s>)
\\ s> cheo ngu>c
\a ti>ng chuong BEL nghe ro
\b xoa lui
\f keo trang
\n dong m>i
\r return
\t c>t tab theo chi>u ngang
\v c>t tab theo chi>u d>c
KY_T>1-KY_T>2
m>i ky t> t> KY_T>1 d>n KY_T>2 theo th> t> tang
d>n
[KY_T>*]
in ARRAY2, copies of CHAR until length of ARRAY1
[KY_T>*REPEAT]
L>P L>I sao chep c>a KY_T>, L>P L>I bat phan n>u
b>t d>u t> 0
[:alnum:]
m>i ch> cai va ch> s>
[:alpha:]
m>i ch> cai
[:blank:]
m>i kho>ng tr>ng n>m ngang
[:cntrl:]
m>i ky t> di>u khi>n
[:digit:]
m>i ch> s>
[:graph:]
m>i ky t> co th> in, tr> kho>ng tr>ng
[:lower:]
m>i ch> cai vi>t thu>ng
[:print:]
m>i ky t> co th> in, l>y c> kho>ng tr>ng
[:punct:]
m>i ky t> ch>m cau
[:space:]
m>i kho>ng tr>ng n>m ngang ho>c d>ng
[:upper:]
m>i ch> cai vi>t hoa
[:xdigit:]
m>i ch> s> th>p l>c
[=KY_T>=]
m>i ky t> tuong duong v>i KY_T>
Translation occurs if -d is not given and both STRING1 and STRING2
appear. -t is only significant when translating. ARRAY2 is extended
to length of ARRAY1 by repeating its last character as necessary.
Excess characters of ARRAY2 are ignored. Character classes expand in
unspecified order; while translating, [:lower:] and [:upper:] may be
used in pairs to specify case conversion. Squeezing occurs after
translation or deletion.
BUGS
Full support is available only for safe single-byte locales, in which
every possible input byte represents a single character. The C locale
is safe in GNU systems, so you can avoid this issue in the shell by
running LC_ALL=C tr instead of plain tr.
TAC GI>
Vi>t b>i Jim Meyering.
THONG BAO L>I
Tr> giup tr>c tuy>n GNU coreutils:
Report any translation bugs to
B>N QUY>N
Copyright (C) 2024 Free Software Foundation, Inc. Gi>y phep GPL pb3+
: Gi>y phep Cong c>ng GNU phien b>n 3 hay sau
.
Day la ph>n m>m t> do: b>n co quy>n s>a d>i va phat hanh
l>i no. KHONG CO B>O HANH GI C>, v>i di>u khi>n du>c phap
lu>t cho phep.
XEM THEM
Tai li>u d>y d> co t>i:
ho>c s>n co n>i b> thong qua: info '(coreutils) tr invocation'
D>CH
B>n d>ch ti>ng Vi>t c>a trang hu>ng d>n nay do
th>c hi>n.
B>n d>ch nay la Tai li>u Mi>n phi; d>c Gi>y phep Cong
c>ng GNU Phien b>n 3
ho>c m>i hon d> bi>t cac di>u kho>n b>n quy>n. Chung
toi cho r>ng KHONG CO TRACH NHI>M PHAP LY.
N>u b>n tim th>y m>t s> sai sot trong b>n d>ch c>a
trang hu>ng d>n nay, vui long g>i thu d>n TODO <>.
GNU coreutils 9.5 Thang 8 nam 2024 TR(1)