- 论坛徽章:
- 6
|
本帖最后由 laliheyi 于 2014-02-10 08:50 编辑
回复 1# registcn
tr版本- tr (GNU coreutils) 5.93
- Copyright (C) 2005 Free Software Foundation, Inc.
- This is free software. You may redistribute copies of it under the terms of
- the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
- There is NO WARRANTY, to the extent permitted by law.
- Written by Jim Meyering.
复制代码 tr帮助中的一段话- When `tr' is performing translation, SET1 and SET2 typically have
- the same length. If SET1 is shorter than SET2, the extra characters at
- the end of SET2 are ignored.
- On the other hand, making SET1 longer than SET2 is not portable;
- POSIX says that the result is undefined. In this situation, BSD `tr'
- pads SET2 to the length of SET1 by repeating the last character of SET2
- as many times as necessary. System V `tr' truncates SET1 to the length
- of SET2.
- By default, GNU `tr' handles this case like BSD `tr'. When the
- `--truncate-set1' (`-t') option is given, GNU `tr' handles this case
- like the System V `tr' instead. This option is ignored for operations
- other than translation.
复制代码 |
|