Sunday, February 15, 2009

Linux : tr (translate) command

I made a good use of the translate command recently to get month-name
in upper case. I needed this in a shell script. Here's the command

date +%b | tr [a-z] [A-Z]

Output: FEB

Learn more about tr using the following command

man tr

2 comments:

  1. Anonymous3:00 PM

    hello... hapi blogging... have a nice day! just visiting here....

    ReplyDelete
  2. Anonymous7:30 PM

    This comment has been removed by a blog administrator.

    ReplyDelete