
Wednesday June 01, 2005
Case conversion in DOS
A friend asked me how to do case conversion in DOS (from lowercase to uppercase). By itself, the MS-DOS shell is pretty limited, compared to Unix shells. However, help's at hand.
From this page, here's the Unix command to convert from uppercase to lowercase :
echo TEST | tr [A-Z] [a-z]
test
To convert from lowercase to uppercase would be just the reverse :
echo test | tr [a-z] [A-Z]
TEST
Now, for the final trick - all you need is the UnixUtils package and you can run the above in DOS just as well as you can in Unix. The UnixUtils is an open-source port of common GNU command-line utilities to Win32 - and you don't need Cygwin to run them.
(2005-06-01 18:04:25 SGT)
[Tech]
Permalink
Most popular blog postings on lowem.log :
1. Singapore SIBOR interest rates fall to 1.5%, lowest since Dec 2004
2. Singapore SIBOR rate falls to 1.31%, lowest since Nov 2004
3. Live spot gold price quotes chart on COMEX
4. Fuel prices seen stoking Malaysia inflation in 2008
5. 2010 Honda Civic Hybrid preliminary specifications released
6. Singapore SIBOR rate fell to 1.25% in Apr 2008, lowest since Aug 2004
7. Malaysia inflation rate jumps to 7.7% in Jun 2008, a 26-year record high
8. Singapore : electricity tariffs to increase April 2008 on rising oil prices
Featured articles on lowem.log :
1. ABC Guide to Beating Inflation in Singapore and Elsewhere
2. Singapore inflation rate hits new 26-year high of 7.5% in Apr 2008
3. Singapore : Bread price inflation continues
4. 2010 Honda Civic Hybrid preliminary specifications released
5. Peakoiler buys 2008 Honda Civic Hybrid FD3
6. How to insert currency exchange rates into Google Spreadsheets
7. Singapore SIBOR rate falls to 0.94% in Nov 2008, lowest since Jul 2004
8. Singapore : Inflation erodes away bank savings
|