Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.internet.services.video.youtube > #394
| From | Paul <nospam@needed.invalid> |
|---|---|
| Newsgroups | comp.internet.services.video.youtube, alt.comp.os.windows-10 |
| Subject | Re: Creating new files of indeterminate sort? |
| Date | 2025-07-30 23:33 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <106eo60$3i64t$1@dont-email.me> (permalink) |
| References | (10 earlier) <106b3go$2prsc$1@dont-email.me> <106b6un$2qsk8$1@dont-email.me> <106b8gk$2rau6$1@dont-email.me> <MPG.42f42d579e6897339896b5@news.eternal-september.org> <106dllq$3b7o1$1@dont-email.me> |
Cross-posted to 2 groups.
On Wed, 7/30/2025 1:44 PM, knuttle wrote:
> I could be wrong but as I remember Powershell was just a CMD that
> was giving administrative privileges. In the current Windows 11 they are
> called Terminal and Terminal (admin). both accept the old DOS commands
> just differing in what they can access.
MSDOS - Close to the hardware, Little protection for the hardware,
"original" shell commands. I don't think there is a Ring0 and a Ring3
for this environment. Some of the commands use raw addresses.
(Raw *physical* addresses, not the virtual ones used elsewhere.)
Command Prompt - Relies on a separate OS. Uses NTVDM for runtime.
MSDOS commands are "emulated", rather than being
direct to hardware. You will be frequently told "this
program only works properly in MSDOS", to remind you
that Command Prompt is not DOSBOX. It's a facade.
PowerShell - The same degree of isolation as the Command Prompt, but
with a "new" programming language and schema. It resorts to
gobs or red text on error. If you run an applet and provide too
few operands, Powershell will ask you for values for the missing
ones (annoying!). Command Prompt does not do that. PowerShell
has tab completion like tcsh. Type something in Powershell,
poke the tab key multiple times and see as it offers suggestions.
In Linux or Unix, you might have several shells. We don't insult them by claiming
one is executing exactly the same commands as the others. They're quite different
at the detail level.
/bin/sh Bourne shell https://en.wikipedia.org/wiki/Bourne_shell
/bin/csh C Shell https://en.wikipedia.org/wiki/C_shell
/bin/tcsh C shell with Tab Completion https://en.wikipedia.org/wiki/Tcsh
While the Windows shells can have *some* similarities
dir # cmd.exe
dir # powershell.exe
the support for dir on powershell, is similar to its half assed support for ls.
dir /ah # cmd.exe (works)
dir /ah # powershell.exe (Uh oh, doesn't work, now we are learning something...)
The dir on Powershell, is an instance of "Get-ChildItem" and it does not
accept the same arguments. So rather than being a custom written "dir",
it is an alias of some kind for "Get-ChildItem". This is a compensation for
the muscle-memory of the user community, who would be typing "dir" and
expecting output like they were typing "ls" on some other systems. But it is
not really dir, it's just a tasty label affixed to "a distant approximation"
to the command.
If I type "ls" in Powershell, it works just as well as typing "dir".
it uses the self-same "Get-ChildItem". If you slap too many arguments
after the "ls" letters (which stand for listdir), the command fails
and you get red colored text.
ls # This never worked in cmd.exe so we expect an error. It's like testing water is wet.
ls # Works as well as "dir" does in Powershell. Would not accept -algtR
So like the Bourne shell example, shells evolve, different people take
a shot at writing them. The language may be procedural, but it can
have some differences. The syntax for a for loop could be quite
different. Powershell has "filter behavior" when piping output from
one applet to another applet (a power user feature, converts gobs of text
into specific terse words).
I don't know enough Powershell to fill a thimble :-) But, I use my experience
to note it's an evolution, someone took a stab at designing a language for
it. And they deposited a few "aliases" in it, to fool you into
thinking that was a real "dir" they offered :-) Well, I was fooled too,
until I did this and it failed. This was a little splash of cold water.
dir /ah # Powershell. Oops. No hidden items for you!
dir /? # Help option in Command Prompt
dir -? # May offer help in Powershell (you *really* should try this one, what an eyeful!)
# I only learned this a few days ago, and me typing it out helps reinforce it :-)
They've made other kinds of "fool you" stuff. Like maybe "wget" is
an alias for some network thing they wrote.
*******
One of the better teaching aids, is when someone makes a "programming card"
with columns for each shell, and what command would be required as an
equivalent for each shell. For Unix, our programming card had five shells
on it, so there were five columns with the commands, and some points in
the table were "missing", when one of the shells had no command to do
a certain thing. For the most part, this wasn't really necessary
for Windows, but maybe a programmer card eventually would be a good idea.
Paul
Back to comp.internet.services.video.youtube | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Creating new files of indeterminate sort? "J. P. Gilliver" <G6JPG@255soft.uk> - 2025-07-28 18:18 +0100
Re: Creating new files of indeterminate sort? "J. P. Gilliver" <G6JPG@255soft.uk> - 2025-07-28 19:10 +0100
Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-28 22:18 +0200
Re: Creating new files of indeterminate sort? "J. P. Gilliver" <G6JPG@255soft.uk> - 2025-07-29 01:37 +0100
Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-29 09:10 +0200
Re: Creating new files of indeterminate sort? "J. P. Gilliver" <G6JPG@255soft.uk> - 2025-07-29 18:46 +0100
Re: Creating new files of indeterminate sort? knuttle <keith_nuttle@yahoo.com> - 2025-07-29 13:58 -0400
Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-29 20:21 +0200
Re: Creating new files of indeterminate sort? knuttle <keith_nuttle@yahoo.com> - 2025-07-29 15:20 -0400
Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-29 21:47 +0200
Re: Creating new files of indeterminate sort? "J. P. Gilliver" <G6JPG@255soft.uk> - 2025-07-29 22:38 +0100
Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-30 08:57 +0200
Re: Creating new files of indeterminate sort? Paul <nospam@needed.invalid> - 2025-07-29 22:02 -0400
Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-30 09:54 +0200
Re: Creating new files of indeterminate sort? Philip Herlihy <nothing@invalid.com> - 2025-07-30 14:24 +0100
Re: Creating new files of indeterminate sort? Paul <nospam@needed.invalid> - 2025-07-30 09:55 -0400
Re: Creating new files of indeterminate sort? knuttle <keith_nuttle@yahoo.com> - 2025-07-30 13:44 -0400
Re: Creating new files of indeterminate sort? Paul <nospam@needed.invalid> - 2025-07-30 23:33 -0400
Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-29 10:03 +0200
Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-29 10:15 +0200
Re: Creating new files of indeterminate sort? "J. P. Gilliver" <G6JPG@255soft.uk> - 2025-07-29 22:51 +0100
Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-30 09:42 +0200
Re: Creating new files of indeterminate sort? Paul <nospam@needed.invalid> - 2025-07-30 10:02 -0400
Re: Creating new files of indeterminate sort? "R.Wieser" <address@is.invalid> - 2025-07-30 17:04 +0200
Re: Creating new files of indeterminate sort? "J. P. Gilliver" <G6JPG@255soft.uk> - 2025-07-30 21:49 +0100
Re: Creating new files of indeterminate sort? Mark Lloyd <not.email@all.invalid> - 2025-07-30 18:15 +0000
Re: Creating new files of indeterminate sort? Paul <nospam@needed.invalid> - 2025-07-30 23:37 -0400
csiph-web