tr man page on Xenix

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



     TR(C)		      XENIX System V			 TR(C)

     Name
	  tr - Translates characters.

     Syntax
	  tr [ -cds ] [ string1 [ string2 ] ]

     Description
	  tr copies the standard input to the standard output with
	  substitution or deletion of selected characters.  Input
	  characters found in string1 are mapped into the
	  corresponding characters of string2.	Any combination of the
	  options -cds may be used:

	  -c	  Complements the set of characters in string1 with
		  respect to the universe of characters whose ASCII
		  codes are 001 through 377 octal

	  -d	  Deletes all input characters in string1

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

	  The following abbreviation conventions may be used to
	  introduce ranges of characters or repeated characters into
	  the strings:

	  [a-z]	  Stands for the string of characters whose ASCII
		  codes run from character a to character z,
		  inclusive.

	  [a*n]	  Stands for n repetitions of a.  If the first digit
		  of n is 0, n is considered octal; otherwise, n is
		  taken to be decimal.	A zero or missing n is taken
		  to be huge; this facility is useful for padding
		  string2.

	  The escape character \ may be used as in the shell to remove
	  special meaning from any character in a string.  In
	  addition, \ followed by 1, 2, or 3 octal digits, stands for
	  the character whose ASCII code is given by those digits.

     Page 1					      (printed 2/7/91)

     TR(C)		      XENIX System V			 TR(C)

	  The following example creates a list of all the words in
	  file1, one per line in file2, where a word is taken to be a
	  maximal string of alphabetics.  The strings are quoted to
	  protect the special characters from interpretation by the
	  shell; 012 is the ASCII code for newline:

	      tr -cs "[A-Z][a-z]" "[\012*]" <file1 >file2

     See Also
	  ed(C), sh(C), ascii(M)

     Notes
	  tr won't handle ASCII NUL in string1 or string2; always
	  deletes NUL from input.

     Page 2					      (printed 2/7/91)

[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server Xenix

List of man pages available for Xenix

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