version 1 showing authors affecting page license.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
TR |
|
|
2 |
!!!TR |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
AUTHOR |
|
|
7 |
REPORTING BUGS |
|
|
8 |
COPYRIGHT |
|
|
9 |
SEE ALSO |
|
|
10 |
---- |
|
|
11 |
!!NAME |
|
|
12 |
|
|
|
13 |
|
|
|
14 |
tr - translate or delete characters |
|
|
15 |
!!SYNOPSIS |
|
|
16 |
|
|
|
17 |
|
|
|
18 |
__tr__ [[''OPTION'']... ''SET1'' |
|
|
19 |
[[''SET2''] |
|
|
20 |
!!DESCRIPTION |
|
|
21 |
|
|
|
22 |
|
|
|
23 |
Translate, squeeze, and/or delete characters from standard |
|
|
24 |
input, writing to standard output. |
|
|
25 |
|
|
|
26 |
|
|
|
27 |
__-c__, __--complement__ |
|
|
28 |
|
|
|
29 |
|
|
|
30 |
first complement SET1 |
|
|
31 |
|
|
|
32 |
|
|
|
33 |
__-d__, __--delete__ |
|
|
34 |
|
|
|
35 |
|
|
|
36 |
delete characters in SET1, do not translate |
|
|
37 |
|
|
|
38 |
|
|
|
39 |
__-s__, __--squeeze-repeats__ |
|
|
40 |
|
|
|
41 |
|
|
|
42 |
replace sequence of characters with one |
|
|
43 |
|
|
|
44 |
|
|
|
45 |
__-t__, __--truncate-set1__ |
|
|
46 |
|
|
|
47 |
|
|
|
48 |
first truncate SET1 to length of SET2 |
|
|
49 |
|
|
|
50 |
|
|
|
51 |
__--help__ |
|
|
52 |
|
|
|
53 |
|
|
|
54 |
display this help and exit |
|
|
55 |
|
|
|
56 |
|
|
|
57 |
__--version__ |
|
|
58 |
|
|
|
59 |
|
|
|
60 |
output version information and exit |
|
|
61 |
|
|
|
62 |
|
|
|
63 |
SETs are specified as strings of characters. Most represent |
|
|
64 |
themselves. Interpreted sequences are: |
|
|
65 |
|
|
|
66 |
|
|
|
67 |
NNN |
|
|
68 |
|
|
|
69 |
|
|
|
70 |
character with octal value NNN (1 to 3 octal |
|
|
71 |
digits) |
|
|
72 |
|
|
|
73 |
|
|
|
74 |
\ |
|
|
75 |
|
|
|
76 |
|
|
|
77 |
backslash |
|
|
78 |
|
|
|
79 |
|
|
|
80 |
a |
|
|
81 |
|
|
|
82 |
|
|
|
83 |
audible BEL |
|
|
84 |
|
|
|
85 |
|
|
|
86 |
b |
|
|
87 |
|
|
|
88 |
|
|
|
89 |
backspace |
|
|
90 |
|
|
|
91 |
|
|
|
92 |
f |
|
|
93 |
|
|
|
94 |
|
|
|
95 |
form feed |
|
|
96 |
|
|
|
97 |
|
|
|
98 |
n |
|
|
99 |
|
|
|
100 |
|
|
|
101 |
new line |
|
|
102 |
|
|
|
103 |
|
|
|
104 |
r |
|
|
105 |
|
|
|
106 |
|
|
|
107 |
return |
|
|
108 |
|
|
|
109 |
|
|
|
110 |
t |
|
|
111 |
|
|
|
112 |
|
|
|
113 |
horizontal tab |
|
|
114 |
|
|
|
115 |
|
|
|
116 |
v |
|
|
117 |
|
|
|
118 |
|
|
|
119 |
vertical tab |
|
|
120 |
|
|
|
121 |
|
|
|
122 |
CHAR1-CHAR2 |
|
|
123 |
|
|
|
124 |
|
|
|
125 |
all characters from CHAR1 to CHAR2 in ascending |
|
|
126 |
order |
|
|
127 |
|
|
|
128 |
|
|
|
129 |
[[CHAR1-CHAR2] |
|
|
130 |
|
|
|
131 |
|
|
|
132 |
same as CHAR1-CHAR2, if both SET1 and SET2 use |
|
|
133 |
this |
|
|
134 |
|
|
|
135 |
|
|
|
136 |
[[CHAR*] |
|
|
137 |
|
|
|
138 |
|
|
|
139 |
in SET2, copies of CHAR until length of SET1 |
|
|
140 |
|
|
|
141 |
|
|
|
142 |
[[CHAR*REPEAT] |
|
|
143 |
|
|
|
144 |
|
|
|
145 |
REPEAT copies of CHAR, REPEAT octal if starting with |
|
|
146 |
0 |
|
|
147 |
|
|
|
148 |
|
|
|
149 |
[[:alnum:] |
|
|
150 |
|
|
|
151 |
|
|
|
152 |
all letters and digits |
|
|
153 |
|
|
|
154 |
|
|
|
155 |
[[:alpha:] |
|
|
156 |
|
|
|
157 |
|
|
|
158 |
all letters |
|
|
159 |
|
|
|
160 |
|
|
|
161 |
[[:blank:] |
|
|
162 |
|
|
|
163 |
|
|
|
164 |
all horizontal whitespace |
|
|
165 |
|
|
|
166 |
|
|
|
167 |
[[:cntrl:] |
|
|
168 |
|
|
|
169 |
|
|
|
170 |
all control characters |
|
|
171 |
|
|
|
172 |
|
|
|
173 |
[[:digit:] |
|
|
174 |
|
|
|
175 |
|
|
|
176 |
all digits |
|
|
177 |
|
|
|
178 |
|
|
|
179 |
[[:graph:] |
|
|
180 |
|
|
|
181 |
|
|
|
182 |
all printable characters, not including space |
|
|
183 |
|
|
|
184 |
|
|
|
185 |
[[:lower:] |
|
|
186 |
|
|
|
187 |
|
|
|
188 |
all lower case letters |
|
|
189 |
|
|
|
190 |
|
|
|
191 |
[[:print:] |
|
|
192 |
|
|
|
193 |
|
|
|
194 |
all printable characters, including space |
|
|
195 |
|
|
|
196 |
|
|
|
197 |
[[:punct:] |
|
|
198 |
|
|
|
199 |
|
|
|
200 |
all punctuation characters |
|
|
201 |
|
|
|
202 |
|
|
|
203 |
[[:space:] |
|
|
204 |
|
|
|
205 |
|
|
|
206 |
all horizontal or vertical whitespace |
|
|
207 |
|
|
|
208 |
|
|
|
209 |
[[:upper:] |
|
|
210 |
|
|
|
211 |
|
|
|
212 |
all upper case letters |
|
|
213 |
|
|
|
214 |
|
|
|
215 |
[[:xdigit:] |
|
|
216 |
|
|
|
217 |
|
|
|
218 |
all hexadecimal digits |
|
|
219 |
|
|
|
220 |
|
|
|
221 |
[[=CHAR=] |
|
|
222 |
|
|
|
223 |
|
|
|
224 |
all characters which are equivalent to CHAR |
|
|
225 |
|
|
|
226 |
|
|
|
227 |
Translation occurs if __-d__ is not given and both SET1 |
|
|
228 |
and SET2 appear. __-t__ may be used only when |
|
|
229 |
translating. SET2 is extended to length of SET1 by repeating |
|
|
230 |
its last character as necessary. Excess characters of SET2 |
|
|
231 |
are ignored. Only [[:lower:] and [[:upper:] are guaranteed to |
|
|
232 |
expand in ascending order; used in SET2 while translating, |
|
|
233 |
they may only be used in pairs to specify case conversion. |
|
|
234 |
__-s__ uses SET1 if not translating nor deleting; else |
|
|
235 |
squeezing uses SET2 and occurs after translation or |
|
|
236 |
deletion. |
|
|
237 |
!!AUTHOR |
|
|
238 |
|
|
|
239 |
|
|
|
240 |
Written by Jim Meyering. |
|
|
241 |
!!REPORTING BUGS |
|
|
242 |
|
|
|
243 |
|
|
|
244 |
Report bugs to |
|
|
245 |
!!COPYRIGHT |
|
|
246 |
|
|
|
247 |
|
|
|
248 |
Copyright 1999 Free Software Foundation, Inc. |
|
|
249 |
This is free software; see the source for copying |
|
|
250 |
conditions. There is NO warranty; not even for |
|
|
251 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR |
|
|
252 |
PURPOSE. |
|
|
253 |
!!SEE ALSO |
|
|
254 |
|
|
|
255 |
|
|
|
256 |
The full documentation for __tr__ is maintained as a |
|
|
257 |
Texinfo manual. If the __info__ and __tr__ programs |
|
|
258 |
are properly installed at your site, the |
|
|
259 |
command |
|
|
260 |
|
|
|
261 |
|
|
|
262 |
__info tr__ |
|
|
263 |
|
|
|
264 |
|
|
|
265 |
should give you access to the complete manual. |
|
|
266 |
---- |