[Info-vax] Long uptime cut short by Hurricane Sandy
AEF
spamsink2001 at yahoo.com
Sun Feb 3 13:35:03 EST 2013
On Feb 2, 11:03 pm, billg... at cs.uofs.edu (Bill Gunshannon) wrote:
> In article <1c8108f9-4792-4eed-8dec-501dd8649... at f6g2000yqm.googlegroups.com>,
> AEF <spamsink2... at yahoo.com> writes:
>
> > On Feb 2, 10:27 am, billg... at cs.uofs.edu (Bill Gunshannon) wrote:
> >> In article <nospam-DA6E3B.16021402022... at news.chingola.ch>,
> >> Paul Sture <nos... at sture.ch> writes:
>
> >> > In article
> >> > <57c7dde5-875e-46e7-a4ff-095bc5d52... at w7g2000yqo.googlegroups.com>,
> >> > AEF <spamsink2... at yahoo.com> wrote:
>
> >> >> Well, let's see. What does # do in Unix? Why it's either tells you
> >> >> what follows is a comment or when in a prompt what follows is a
> >> >> command run with full super user powers!
>
> >> >> Comment vs super user. Nice.
>
> >> 1. Prompt is the shell, not Unix.
> > Extreme nitpick. It's a shell that runs in Unix, which makes it a Unix
> > shell.
>
> It's also a shell that runs on VMS. Does that make VMS Unix?
No, but the shell has its origins in Unix. (Well, I don't know all of
computer history, but I've never seen "the shell" anywhere else.) I
can run other programs/shells/whatever in VMS and they can do various
things. That's doesn't make VMS them, either. But that's beside the
point.
OK, it's a shell that is what is typically encountered running on Unix
for command input. Is that explicit enough? Detailed enough? Specific
enough?
Shells like bash are a normal part of Unix. They're not a normal part
of VMS.
On a Unix system you typically get a shell like bash, or ksh and the
like. On VMS you typically get DCL. We have hundreds of servers at
work and guess how many of them are running anything other than the
Bourne shell or the bash shell? ZERO! We had as many as 40 or so VAX
systems online at one point ca. 2001, and guess how many of them were
running Bourne or bash? ZERO! Was our Stratus running bash or similar?
NO! Do you see a pattern here? (^_^)
Now, leaving the confines of my company:
So how many VMS systems are running bash, or any other "Unix" shell?
If I logged into a VMS system and found myself with bash instead of
DCL, I'd be very surprised! I suppose you wouldn't? If I found VMS
startup scripts written in bash, I'd be very surprised!
If you're going to get this nitpicky, I can tear apart your democracy
bit, too.
You obviously have no idea what democracy is. There is no country
comprised of three wolves and a sheep. Wolves and sheep can't vote.
They don't understand the concept. Wolves may well like to eat sheep,
but that has nothing to do with democracy! Maybe you should stick with
Unix.
> >> 2. Prompt is totally user settable and has no significance whatsoever.
> > Really? Running su gives you a # prompt!!!
>
> Only if you su to root and root has the "#" set as his prompt. If you
> su to any other user you will get whatever they have as their prompt.
>
> > I suppose su has nothing to
> > do with Unix, either.
>
> Nobody said that. But you obviously have no idea what su actually does.
It lets you become another user. I neglected to include the case in
which you use it to become a user other than "root". I usually use
sudo if I want to run a command as another user. But at times it's
convenient to actually become root, or become the superuser (or
whatever you want to call it), in which case by default I'm given the
# in the prompt. So normally I only use it to become root. Yep, my
bad.
>
> >> Here is mine on the University server:
>
> >> login as: bill
> >> Using keyboard-interactive authentication.
> >> Password:
>
> >> server1#
> > Irrelevant.
>
> Why? I am a regular user and my prompt is a "#".
Do I really have to explain this?
OK, I'll give it a shot:
Because you changed it! By default you don't get the # unless you
become the superuser. The default behavior is as I described. When you
run the su command to become root, the prompt is changed to #. And why
is this? To remind you that you are root, the superuser, that a simple
type or other error can cause grave harm to your system! I don't know
why YOU use #. That's irrelevant. We're talking about Unix, or "the
shell", or su -- not Bill's Unix session.
> >> 3. I'll bet you also think the su command means "super user".
> > You bet wrong. Also irrelevant.
>
> So, what do you think the su command really does?
It lets you become, or "switch" to another user. I normally only use
it to become root, hence my previous post(s). And when you do so, it
gives you the # prompt. And what is the purpose of the # prompt? To
warn you that your in superuser mode, or root, or whatever nitpicky
term you want to use.
>
> >> > You missed out shebang, as in:
>
> >> > #!/bin/sh
> > Oh, so # in a shell script is Unix, but in a prompt from the su
> > command it's "the shell".
>
> Huh? What are you talking about. In one case it's output and in the
> other it's input. And in both cases it is shell.
Ah, so all of a sudden, su, which is not a built-in command (correct
me if I'm wrong -- as if I have to say it!), is now part of the shell.
Isn't that like saying SET PROCESS/PRIV=ALL is a built-in DCL
command?
OK, so here we have a character, the # character, that is used by the
same thing (as you said immediately above), to be either the comment
character or the root prompt. This entity, "the shell", as you put it
just above, and this use of #, is normally part of a Unix session.
Yes, you can change it, but so what? The default is what I described.
I can paint the green leaves of a plant red. So what? The leaves of a
plant are normally green. Or, if you nitpick that, I can swap one kind
of plant in my garden with another.
So how many VMS systems are running bash, or any other shell that
typically runs on a Unix system? How many IBM systems are running
this? How many Stratus (VOS) systems? How many Windows systems? Now,
how many Unix systems are running DCL, JCL, VOS, etc.?
So I think we're agreed at least that the same entity, "the shell",
uses # in two extremely "opposite" ways. What we disagree on is
whether this entity has anything to do with Unix. I've never
encountered it anywhere else. I think it's use anywhere else is
minimal at best. I don't believe these shells were originally written
for other OSes. AFAIK, they originate in the Unix world. It is a
normal part of the Unix world. It is at least prevalent, if not
ubiquitous, in the Unix world, and not anywhere else.
Let me review:
Look,
You go into the VMS world and you get a $ prompt. You can change that
to something else. So what? By default, VMS gives you a $. And the
comment character is by default a "!". And these are DCL things. You
can change the prompt, but so what? It's normally $.
You go into the Unix world and you get the # as I described. Yes, you
can change that, but as given to you, the Unix world uses # for at
least three different purposes. Please don't re-iterate nonsense about
it's a shell and what not. You start out using Unix and you get
characters whose default behavior can be either the start of totally
harmless comment or a command with superuser powers that can decimate
the machine. Yeah, there's the shebang, too. Makes things even worse!
Oh, and now you'll tell me I can rewrite the kernel, too.
OK, maybe I should have used the term "vanilla". Vanilla shell or
vanilla Unix or vanilla kernel or whatever you're going to tell me it
is. When a user starts out using Unix systems using the typical shells
they come with, the # can render the text following it either as
comments or as potentially very destructive commands.
So, in other words: In such a world, the # character can be either the
comment character or a prompt (or part of a prompt) whose intended
purpose is to remind you that you now have full-blown, root, superuser
powers. And I think it's a bad design to have a the same character
used for extreme opposite purposes.
>
> > I don't believe su is a built-in. Hey,
> > correct me if I'm wrong on that.
>
> Who ever said it was? And what does that have to do with the prompt
> output by the shell?
You did up above. You say (or clearly imply) that su, which when used
to become root, puts a # in your prompt, is part of the shell!
> >> >http://en.wikipedia.org/wiki/Shebang_%28Unix%29
>
> >> I was going to mention that as the on place where a line beginning with
> >> an octothorpe is not a comment and is not ignored.
>
> >> bill
>
> >> --
> >> Bill Gunshannon | de-moc-ra-cy (di mok' ra see) n. Three wolves
> >> billg... at cs.scranton.edu | and a sheep voting on what's for dinner.
> >> University of Scranton |
> >> Scranton, Pennsylvania | #include <std.disclaimer.h>
> > AEF
> > I vote for matzo ball soup. And then some roast chicken (with
> > paprika), potatoes, and some beets.
>
> And that statement makes as much sense as anything you have said about
> Unix. You really should stick to VMS.
It makes more sense than wolves and sheep voting in a democracy, much
less being an electorate.
> bill
>
> --
> Bill Gunshannon | de-moc-ra-cy (di mok' ra see) n. Three wolves
> billg... at cs.scranton.edu | and a sheep voting on what's for dinner.
> University of Scranton |
> Scranton, Pennsylvania | #include <std.disclaimer.h>
AEF
More information about the Info-vax
mailing list