diff options
author | 2006-05-17 07:18:54 +0000 | |
---|---|---|
committer | 2006-05-17 07:18:54 +0000 | |
commit | 5ff6a780ae4a8d0308204058cc88917cdd763854 (patch) | |
tree | 684827bc9d4925a40055d0629a73b52c46e1c1e5 /tools-reference/tr | |
parent | gtk2 -> gtk (diff) | |
download | devmanual-5ff6a780ae4a8d0308204058cc88917cdd763854.tar.gz devmanual-5ff6a780ae4a8d0308204058cc88917cdd763854.tar.bz2 devmanual-5ff6a780ae4a8d0308204058cc88917cdd763854.zip |
Add the remaining tools-references that were missing
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/devmanual/trunk@42 176d3534-300d-0410-8db8-84e73ed771c3
Diffstat (limited to 'tools-reference/tr')
-rw-r--r-- | tools-reference/tr/text.xml | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/tools-reference/tr/text.xml b/tools-reference/tr/text.xml new file mode 100644 index 0000000..e7002e1 --- /dev/null +++ b/tools-reference/tr/text.xml @@ -0,0 +1,62 @@ +<?xml version="1.0"?> +<guide self="tools-reference/tr/"> +<chapter> +<title>tr -- Character Translation</title> +<body> + +<p> +The <c>tr</c> command can be used to translate, squeeze and delete character +sequences. See <c>man tr</c> and <uri +link="http://www.opengroup.org/onlinepubs/000095399/utilities/tr.html"> +IEEE1003.1-2004-tr</uri> for the full specification. +</p> + +<note> +<c>tr</c>, unlike most other utilities, only reads from standard input +and only writes to standard output. Therefore, you will have to use +<c>tr [options] < input > output</c>. +</note> + +<p> +<c>tr</c> operates in a number of modes, depending upon the invocation: +</p> + +<dl> + <dt> + Deleting characters + </dt> + <dd> + <p> + To delete all occurrences of certain characters, use <c>tr -d asdf</c>. + </p> + </dd> + <dt> + Deleting repeated characters + </dt> + <dd> + <p> + To replace repeated characters with a single character ('squeeze'), use + <c>tr -s asdf</c>. + </p> + </dd> + <dt> + Transliterating characters + </dt> + <dd> + <p> + To replace all 'a' characters with '1', all 'b' with '2' and all 'c' with + '3', use <c>tr abc 123</c>. + </p> + </dd> +</dl> + +<p> +Certain special forms are allowed for the arguments. <c>a-z</c> expands to all +characters from 'a' to 'z', <c>\t</c> represents a tab and so on. See the +documentation for a full list. +</p> + +</body> +</chapter> +</guide> + |