tr man page on SunOS

Man page or keyword search:  
man Server   20652 pages
apropos Keyword Search (all sections)
Output format
SunOS logo
[printable version]

tr(1B)		   SunOS/BSD Compatibility Package Commands		tr(1B)

NAME
       tr - translate characters

SYNOPSIS
       /usr/ucb/tr [-cds] [ string1 [string2]]

DESCRIPTION
       The  tr	utility	 copies the standard input to the standard output with
       substitution or deletion of selected characters. The arguments  string1
       and  string2  are  considered  sets  of characters. Any input character
       found in string1 is mapped into	the  character	in  the	 corresponding
       position	 within	 string2.  When	 string2 is short, it is padded to the
       length of string1 by duplicating its last character.

       In either string the notation:

	      a−b

       denotes a range of characters from a to b in  increasing	 ASCII	order.
       The  character  \,  followed  by	 1, 2 or 3 octal digits stands for the
       character whose ASCII code is given by those digits. As with the shell,
       the  escape  character  \, followed by any other character, escapes any
       special meaning for that character.

OPTIONS
       Any combination of the options -c, -d, or -s may be used:

       -c	Complement the set of characters in string1  with  respect  to
		the  universe  of  characters whose ASCII codes are 01 through
		0377 octal.

       -d	Delete all input characters in string1.

       -s	Squeeze all strings of repeated output characters that are  in
		string2 to single characters.

EXAMPLES
       Example 1: Creating a list of all the words in a filename

       The following example creates a list of all the words in filename1, one
       per line, in filename2, where a word is taken to be a maximal string of
       alphabetics. The second string is quoted to protect `\' from the shell.
       012 is the ASCII code for NEWLINE.

       example% tr -cs A−Za−z '\012' <filename1>filename2

ATTRIBUTES
       See attributes(5) for descriptions of the following attributes:

       ┌─────────────────────────────┬─────────────────────────────┐
       │      ATTRIBUTE TYPE	     │	    ATTRIBUTE VALUE	   │
       ├─────────────────────────────┼─────────────────────────────┤
       │Availability		     │SUNWscpu			   │
       └─────────────────────────────┴─────────────────────────────┘

SEE ALSO
       ed(1), ascii(5), attributes(5)

NOTES
       Will not handle ASCII NUL in string1 or string2. tr always deletes  NUL
       from input.

SunOS 5.10			  26 Sep 1992				tr(1B)
[top]

List of man pages available for SunOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net