
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. 2010 Nissan Leaf electric car specifications : 107hp, 24KWh lithium-ion batteries, 100-mile range
2. 2010 Honda CR-Z hybrid, 2010 Honda Fit/Jazz hybrid models confirmed
3. 2010 Honda Civic Hybrid preliminary specifications released
4. Singapore SIBOR rate falls to 0.69% in Jan 2009, lowest since Apr 2004
5. How to insert currency exchange rates into Google Spreadsheets
6. Singapore : Nuclear power not ruled out
7. Live spot gold price quotes chart on COMEX
8. 2010 Toyota Prius specifications released : 50 mpg, 1.8L, 134hp, Ni-MH, solar roof option
Featured articles on lowem.log :
1. 2010 Honda Civic Hybrid preliminary specifications released
2. 2010 Honda CR-Z hybrid, 2010 Honda Fit/Jazz hybrid models confirmed
3. 2010 Toyota Prius specifications released : 50 mpg, 1.8L, 134hp, Ni-MH, solar roof option
4. Honda, GS Yuasa JV to make lithium-ion batteries for 2010/2011 Honda Civic Hybrid
5. New efficient nanotech materials may boost enhanced geothermal power systems
6. NYMEX crude oil recovers from $32.40 low after 2.2 mbpd OPEC production cut announced
7. Singapore property market recovery seen as private home sales surge 52% in Jul 2009
8. Singapore SIBOR rate falls to 0.69% in Jan 2009, lowest since Apr 2004
|