Hi,

tr - TRanslate or Delete characters

Summary: 

tr will translate, squeeze, and/or delete characters from stdin,
writing to stdout. 'tr' supports few standard Esc sequences, regular
expressions, char classes (lower, upper, space, blank, alpha ...),
etc.

Examples:

$ echo "tenet" | tr "tn" "TN" -- Translate t to T & n to N.

$ echo "ilugc" | tr "[a-z]" "[A-Z]" -- Change case (lower to upper)

$ echo "ilugc" | tr '[:lower:]' '[:upper:]' -- Same as above.

$ echo "HelloooOOOoooo" | tr -s '[:lower:]' -- Squeeze the "lower" 
                                               case letters.

$ echo "IwLxUyGzC" | tr -d xyz -- Remove xyz

$ cat myfile | tr -s '\n' -- Remove repeated new lines.

$ echo "ABCDEFG" | tr -c "ACEG" "\n" -- Expect "ACEG" translate 
                                        others to newline char.

Read : man tr

        manoj
-- 
Prejudice: A vagrant opinion without visible means of support. Ambrose
Bierce
Manoj Srivastava <[EMAIL PROTECTED]> <http://www.debian.org/~srivasta/>  
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"NLUG" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/nlug-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to