Scroll to navigation

TR(1) Các câu lệnh TR(1)

TÊN

tr - translate or delete characters

TÓM TẮT

tr [OPTION]... STRING1 [STRING2]

MÔ 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.

use the complement of ARRAY1
delete characters in ARRAY1, do not translate
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
hiển thị trợ giúp này rồi thoát
đưa ra thông tin phiên bản rồi thoát

ARRAYs are specified as strings of characters. Most represent themselves. Interpreted sequences are:

ký tự với giá trị bát phân NNN (1 tới 3 chữ số)
\\
sổ chéo ngược
tiếng chuông BEL nghe rõ
xóa lùi
kéo trang
dòng mới
return
cột tab theo chiều ngang
cột tab theo chiều dọc
mọi ký tự từ KÝ_TỰ1 đến KÝ_TỰ2 theo thứ tự tăng dần
[KÝ_TỰ*]
in ARRAY2, copies of CHAR until length of ARRAY1
[KÝ_TỰ*REPEAT]
LẶP LẠI sao chép của KÝ_TỰ, LẶP LẠI bát phân nếu bằt đầu từ 0
[:alnum:]
mọi chữ cái và chữ số
[:alpha:]
mọi chữ cái
[:blank:]
mọi khoảng trắng nằm ngang
[:cntrl:]
mọi ký tự điều khiển
[:digit:]
mọi chữ số
[:graph:]
mọi ký tự có thể in, trừ khoảng trắng
[:lower:]
mọi chữ cái viết thường
[:print:]
mọi ký tự có thể in, lấy cả khoảng trắng
[:punct:]
mọi ký tự chấm câu
[:space:]
mọi khoảng trắng nằm ngang hoặc đứng
[:upper:]
mọi chữ cái viết hoa
[:xdigit:]
mọi chữ số thập lục
[=KÝ_TỰ=]
mọi ký tự tương đương với KÝ_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.

TÁC GIẢ

Viết bởi Jim Meyering.

THÔNG BÁO LỖI

Trợ giúp trực tuyến GNU coreutils: <https://www.gnu.org/software/coreutils/>
Report any translation bugs to <https://translationproject.org/team/>

BẢN QUYỀN

Copyright © 2023 Free Software Foundation, Inc. Giấy phép GPL pb3+ : Giấy phép Công cộng GNU phiên bản 3 hay sau <https://gnu.org/licenses/gpl.html>.
Đây là phần mềm tự do: bạn có quyền sửa đổi và phát hành lại nó. KHÔNG CÓ BẢO HÀNH GÌ CẢ, với điều khiển được pháp luật cho phép.

XEM THÊM

Tài liệu đầy đủ có tại: <https://www.gnu.org/software/coreutils/tr>
hoặc sẵn có nội bộ thông qua: info '(coreutils) tr invocation'

DỊCH

Bản dịch tiếng Việt của trang hướng dẫn này do

thực hiện.

Bản dịch này là Tài liệu Miễn phí; đọc Giấy phép Công cộng GNU Phiên bản 3 hoặc mới hơn để biết các điều khoản bản quyền. Chúng tôi cho rằng KHÔNG CÓ TRÁCH NHIỆM PHÁP LÝ.

Nếu bạn tìm thấy một số sai sót trong bản dịch của trang hướng dẫn này, vui lòng gửi thư đến TODO.

Tháng 1 năm 2024 GNU coreutils 9.4