Re: MSDOS limitations - WAS sed command
Date: Fri, 15 May 2009 09:50:54 -0700
On Fri, May 15, 2009 at 9:03 AM, Bellows, Bambi (Comsys) <bbel5_at_allstate.com
> As I understand it, the reason that MS-DOS has such a limited set of
> commands was that it never needed anything more. The story goes that it was
> originally called QDOS, for “quick and dirty operating system”. Bill Gates
> put much more into marketing, sales and lawyers than he ever did into the
> underlying operating system. After he simultaneously fought both sides of
> the “look and feel” issue (again, as I understand it, Lotus v Excel and
> Windows v Mac) and won one and lost the other, he put all his resources into
> the GUI side of the house and never looked back. Those poor jerks writing
> command-line batch files in MS-DOS have the slimmest most arcane set of
> tools around. But, they always have, and it’s been 30 years, so…………..
> If you haven't recently looked at the commands available
at the CMD prompt, you may want to do so before calling them 'limited'.
They are however different than commands in *nix land. MSDOS commands typically do not work as well in pipelines.
There are some very powerful commands available at the CMD prompt.
Have a look at subinacl some time. It is not installed by default, but freely available from microsoft.com. This is th swiss army knife of permissions reporting/setting tools.
Another thing that is different is how the output of a command is assigned to a variable - different, but doable via the FOR command
_at_for /F %%I in ('getenvval.pl -name ORACLE_HOME') do (
Take a look in 'Command-line reference A-Z' in Windows Help.
That said, the use of these commands somewhat arcane at times, and of course limited by the primitive Batch language.
There's always VBScript, Perl (my favorite) or others to tie things together. The Power Shell is still an unknown to me.
Certifiable Oracle DBA and Part Time Perl Evangelist