Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site noscvax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!harpo!decvax!ittvax!dcdwest!sdcsvax!noscvax!kemp From: kemp@noscvax.UUCP Newsgroups: net.unix Subject: examples of tr Message-ID: <414@noscvax.UUCP> Date: Thu, 19-Apr-84 09:27:31 EST Article-I.D.: noscvax.414 Posted: Thu Apr 19 09:27:31 1984 Date-Received: Sat, 21-Apr-84 02:13:37 EST Organization: Naval Ocean Systems Center Lines: 19 -a non-blank line- Here are three examples of using tr on a 4.2bsd system. Does anyone have comments? % tr -cs A-Za-z '\012' file2 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 second string is quoted to protect `\' from the shell. 012 is the ascii code (in octal) for newline. % tr A-Z a-z will translate all upper case characters into lower case. % tr -d '\015' < in > out will read from file 'in', deleting all ^M (carriage return) characters and storing the result into file 'out'. 015 is the ascii code (in octal) for carriage return. - - - - - - * - - - - - -