• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

what's your favorite shell?

Page 2 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.
(I never said MS currently includes all the useful utilities necessary to do EVERYTHING at the command-line...)

They hardly include any of them, at this point I'm surprised cmd isn't a downloadable addon.

You could write your own shell that intercepts Ctrl-D and swaps input/output buffers to the console with a 'fg' built-in command.

Not to be pedantic, but Ctrl+D is EOF, Ctrl+Z is suspend =)

Slightly OT, but how many of you remember boot-strapping a freshly-installed Windows OS, and having to use the command-line FTP.EXE bundled with MS's TCP/IP stack to go to ftp.microsoft.com to download IE?
Thank goodness, when all else fails, there is the command-line to fall back on, eh?

That must be pretty far back, because even NT4 came with IE2 bundled.
 
Originally posted by: drag
can I, say, install and setup MSSQL, say from a laptop in case you get stuck out in the boonies and need to do some emergancy stuff... Or install backups without having to be present to reboot the machine.
Absolutely, all over "Remote Desktop Connection" (a.k.a., Terminal Services). The server must be WinXP Pro or later, the client can be just about anything (including Mac OSX). Why would you have to be present to reboot the machine? "shutdown -r -t 0"

Or dozens of other things.. I dont know.
I don't either. 😛

Can you start and stop services from a ssh client? Say half you dll's are wiped out.
Is the machine still running? Because if they were system dll's, System File Protection would have recovered them automagically (and prevented you from overwriting them to begin with).

But yes, you can start and stop services from the command-line. Try "sc /?" for all the options. This works remotely via a TS connection great too.

For instance in Redhat, Solaris, or Debian every single administration thing that I can do in a GUI I can do in the command line. A configs are simple text based affairs.
First of all, just about every setting in Windows is stored in the Registry. The shell's control panel GUI is mostly just a front-end for setting Registry key values. Windows apps traditionally go to the Registry to fetch settings. The Registry is designed to be accessed programmatically, which means it's absolutely designed for scripting and automation.

The registry has some nice properties because it's not text-based. Each independent key can have individual security restrictions/permissions (unlike configuration files, where the file has a single monolithic set of permissions at the file level). Plus, the Registry stores configuration settings in multiple different data types. Binary, decimal, hexadecimal, strings, array of strings, binary_blob, etc. This makes programmatic access very intuitive. You could say it's "strongly typed".

I mean can you edit the registry from cmd.exe if you have too?
The MSH shell I was referring to earlier actually mounts the registry, so you can walk from RegKey to RegKey, create new keys, display current keys, etc... all like you're dealing with directories and files.

But even if you only have cmd.exe, then you can still use reg.exe ("Console Registry Tool") which is built into XP, for all your registry scripting needs.

Or fix it from recorvery console or copy it to another computer, fix it their and copy it back?
Absolutely. Exporting and importing hives has always been an essential task for Windows sysadmins. Reg.exe supports this from the command-line.

Can I "trail" system logs, or e-mail people via the command line. How difficult would it be to trail a system log and have it e-mail me if it had a certian alert, or a certian person logged in? What if I had a cluster of machines operating that I had to watch over?
I have used a command-line mailer before, but it was not part of Windows itself. It was a freeware utility. SMTP is fully supported by Windows via programming APIs, so scripts can send email like this (and obviously full utility apps can do it too). As for setting up alerts for system logs, I admit to having never done this before from the command-line. But I can almost guarantee that it is exposed via another Programming API (the logging API) and therefore is fully scriptable, and utilities probably already exist to perform common log tasks from the NT command line.


Of course they have a couple Windows machines, and they use VNC for that, but it's a kinda of a pain for them to do anything using it compared to having something right their they can type into.
If they're still using VNC, then I would set them straight. Any admin that knows anything should be using RDC (TS) by now. VNC isn't secure and has lots of other limitations. And as for remote administration, System Update Server (available since NT4 Server) makes remote administration a joke. Your remote admin doesn't even need to know how to use the command-line.

I am not talking just about the shell, but the entire OS. Windows realy isn't designed to be realy administrated from the command line.
Just because you haven't used Windows that way doesn't mean it can't be done. Windows is designed so that if you don't really know what you're doing, you definitely use the GUI. Even some people that do know what they're doing use the GUI. But in Windows Server 2003, for example, almost every aspect of system administration, installation, and configuration can be scripted.

But I just a command line type of guy. Lots of stuff that is easy for me to do on my linux machine is very difficult to accomplish.
I can just about guarantee that 90% of it is JUST as easy to do on Windows from the command line, but the difference is that you THINK it isn't as easy because you don't know how to do it. You've probably only spent time working with the Windows Shell, and never spent much time on the admin side working with various scripting and remoting tools for NT.

And I think a lot of Linux advocates are in the same boat: they get surprised when they find out that Windows can do the same stuff, and they didn't know about it. They make the mistake of assuming that Windows can't do stuff simply because they don't know how to do it.

 
The registry has some nice properties because it's not text-based. Each independent key can have individual security restrictions/permissions (unlike configuration files, where the file has a single monolithic set of permissions at the file level). Plus, the Registry stores configuration settings in multiple different data types. Binary, decimal, hexadecimal, strings, array of strings, binary_blob, etc. This makes programmatic access very intuitive. You could say it's "strongly typed".

In theory it sounds great, but in practice is a PITA. There's no CLI tools to easily edit it and you've created a single ponit of failure, the system hive gets corrupted and the box is dead and that used to happen a decent amount with our NT4 workstations where I work. If a file gets corrupted on a unix box one thing is broke, not the whole thing and even if it's something like /sbin/init or /etc/rc you can still boot in single user mode to fix it, the recovery console is sh!t compared to booting a unix box into single user mode.

The MSH shell I was referring to earlier actually mounts the registry, so you can walk from RegKey to RegKey, create new keys, display current keys, etc... all like you're dealing with directories and files.

And it only took, what 10 years?

And I think a lot of Linux advocates are in the same boat: they get surprised when they find out that Windows can do the same stuff, and they didn't know about it. They make the mistake of assuming that Windows can't do stuff simply because they don't know how to do it.

It's also the fact that everything is hidden, on unix you just poke around the filesystem and you can find everything available. On Windows the registry is so cryptic it's not funny, even MS doesn't document all the settings they make available. Sure everything is exposed via some API, but why should I have to break out VBScript all the time? I like being able to poke around in /etc and /proc to find things out about my machine, running command --help or man command to find out what something does, etc.

Basically MS designed the system to be easy to do basic stuff if you haven't got a clue what you're doing, want a file server? And then they tacked on the real administration stuff on at the last minute and just now seem to be seriously getting it up to snuff.
 
If they're still using VNC, then I would set them straight. Any admin that knows anything should be using RDC (TS) by now. VNC isn't secure and has lots of other limitations. And as for remote administration, System Update Server (available since NT4 Server) makes remote administration a joke. Your remote admin doesn't even need to know how to use the command-line.


They have the network itself secure. They could use telnet and still be safe for the most part, and VNC isn't as bad with passwords and such that it used to be. If I wanted to hack the systems I suppose I could, but they'd know it was me. All network activity is logged, they even know that I spend a great deal of time typing out stuff here at work, they've shown me the logs. (not that they care a whole lot, I get everything done) 😛

And I don't think that RDC would be a option for them, unless MS has released Linux and OS/2 clients....

Anyways that stuff doesn't solve the command line sucking stuff, it's just moved the solution to a much more complex and convoluted way of doing things thru GUI interfaces. I mean with Linux we've had X for what seems like centuries, after all stuff like VNC was created in the first place to get the images of X servers onto Windows clients.

And I think a lot of Linux advocates are in the same boat: they get surprised when they find out that Windows can do the same stuff, and they didn't know about it. They make the mistake of assuming that Windows can't do stuff simply because they don't know how to do it.

Maybe MS should then take more time to publish online books, examples, and howtos on how to do this sort of stuff.
 
all the shell debating aside... i thought the whole point of windows was the ease of use/administration in pointing and clicking your way around an AD. now windows is starting to blur the line with a shell????

whats this world coming to?? next youll tell me that unix has a GUI!!! ridiculous!! </joke>

btw, my favorite shell is bash.
 
Originally posted by: Nothinman
The MSH shell I was referring to earlier actually mounts the registry, so you can walk from RegKey to RegKey, create new keys, display current keys, etc... all like you're dealing with directories and files.

And it only took, what 10 years?

We're damned if we do, damned if we don't in that respect.

This "Monad" shell (MSH) is really way cool. You guys are going to be jealous, just wait. 😛
 
We're damned if we do, damned if we don't in that respect.

I doubt it because the people that used it would like it and the ones that didn't probably wouldn't even know it existed. Can you really name 1 NT admin that would complain that MS added CLI support for something?

You guys are going to be jealous, just wait

It might end up being a good shell, but I doubt anyone would actually be jealous over it.
 
Originally posted by: Nothinman
You guys are going to be jealous, just wait
It might end up being a good shell, but I doubt anyone would actually be jealous over it.

That reminds me of an account that I read on the net, of some unix-y event (Usenix?), where there was a microsofty giving a presentation on the features of their (then-new, I think) "Services for Unix" package for NT, and describing the features of their shell, which is based on the Korn shell, and as it so happens, David Korn was in the audience, and started to debate whether some features were implemented properly, and the microsofty, apparently completely unaware of who he actually was, started arguing with him. It was absolutely hilarious to read. (It was presented slightly better than I just did.)

I'm sure that this is on the net somewhere, probably on a web archive of a mailing list or something. Ever come across that account in your travels, Nothinman (or anyone else)?

I have to admit, this is the first time, that I had ever heard, that MS has provided a command-line tool for manipulating the registry in NT (reg.exe). Also, one of my remaining gripes is that MS still hasn't released a command-line tool for dealing with NTFS alternate streams and mount-points ("junctions", in MS-speak). Thank heavens for the guys at SysInternals. I still don't understand why they haven't released their own OS, and put MS out of business. 🙂
 
Originally posted by: arsonist
my favorite shell is bblean (a tree of blackbox)

er... wrong kind of shell buddy 😉

(i always thought it was a bit dumb how they commandeered the word and used it for something totally different like that)
 
Originally posted by: VirtualLarry
Originally posted by: Nothinman
You guys are going to be jealous, just wait
It might end up being a good shell, but I doubt anyone would actually be jealous over it.

That reminds me of an account that I read on the net, of some unix-y event (Usenix?), where there was a microsofty giving a presentation on the features of their (then-new, I think) "Services for Unix" package for NT, and describing the features of their shell, which is based on the Korn shell, and as it so happens, David Korn was in the audience, and started to debate whether some features were implemented properly, and the microsofty, apparently completely unaware of who he actually was, started arguing with him. It was absolutely hilarious to read. (It was presented slightly better than I just did.)

I'm sure that this is on the net somewhere, probably on a web archive of a mailing list or something. Ever come across that account in your travels, Nothinman (or anyone else)?

I have to admit, this is the first time, that I had ever heard, that MS has provided a command-line tool for manipulating the registry in NT (reg.exe). Also, one of my remaining gripes is that MS still hasn't released a command-line tool for dealing with NTFS alternate streams and mount-points ("junctions", in MS-speak). Thank heavens for the guys at SysInternals. I still don't understand why they haven't released their own OS, and put MS out of business. 🙂

google is pretty cool.
found it

also from slashdot q&amp;a

Question 5) True Story?
by travisd (travisd_no_spam@tubas.net)

Was the story about you embarrassing a Microsoftie at a conference true? Specifically, that he was insisting that their implementation of ksh in their unix compatibility kit was true to the "real" thing and trying to argue the point with you. The argument ended when someone else finally stood up and informed the speaker who he was arguing with.

Just curious ...

Korn: This story is true. It was at a USENIX Windows NT conference and Microsoft was presenting their future directions for NT. One of their speakers said that they would release a UNIX integration package for NT that would contain the Korn Shell.

I knew that Microsoft had licensed a number of tools from MKS so I came to the microphone to tell the speaker that this was not the "real" Korn Shell and that MKS was not even compatible with ksh88. I had no intention of embarrassing him and thought that he would explain the compromises that Microsoft had to make in choosing MKS Korn Shell. Instead, he insisted that I was wrong and that Microsoft had indeed chosen a "real" Korn Shell. After a couple of exchanges, I shut up and let him dig himself in deeper. Finally someone in the audience stood up and told him what almost everyone in the audience knew, that I had written the 'real' Korn Shell. I think that this is symbolic about the way the company works.

 
Originally posted by: kylef
Originally posted by: Nothinman
The MSH shell I was referring to earlier actually mounts the registry, so you can walk from RegKey to RegKey, create new keys, display current keys, etc... all like you're dealing with directories and files.

And it only took, what 10 years?

We're damned if we do, damned if we don't in that respect.

This "Monad" shell (MSH) is really way cool. You guys are going to be jealous, just wait. 😛

I have looked into MSH ever since i first heard about it and seen some nice developments happen, but.

It is the underlying OS arch that limits it, it breathes and talks MS-speak no matter how similar it tries to be to other shells and NO shell is better than the system it is running on.

Therefore, i don't see myself using this shell in the future, it WILL however be a nice addition for those poor admins who are forced to work on MS OS's.

Next step is to skip the GUI environment completely for servers that don't need it, copying *nix isn't easy when you have spent so many years trying to go in a different direction, but i am sure that MS will eventually get there.
 
Next step is to skip the GUI environment completely for servers that don't need it, copying *nix isn't easy when you have spent so many years trying to go in a different direction, but i am sure that MS will eventually get there.

And by then unix will be on the opposite end of the spectrum because of the advancements Gnome and KDE are making and companies like Oracle requiring GUIs for installs, updates, etc.
 
Originally posted by: Nothinman
Next step is to skip the GUI environment completely for servers that don't need it, copying *nix isn't easy when you have spent so many years trying to go in a different direction, but i am sure that MS will eventually get there.

And by then unix will be on the opposite end of the spectrum because of the advancements Gnome and KDE are making and companies like Oracle requiring GUIs for installs, updates, etc.

I hope not. KDE and gnome is nice, but there is just to much stuff that a GUI makes a pain in the rear.

What I am looking for is what sort of things you can figure out to do with 3-d user interfaces. I envision us flying around in a cyberpunk-isk enviroment with command line-type controls via typing and voice recongition.

And Exploder-style file managers will just be a bad memory.
 
This is frustrating. I started off my first reply to this thread with a completely innocuous, positive post about MSH, providing a link in case no one had heard of it, and bringing some small bit of attention to the NT side of the shell world (something not many people know much about).

I certainly did not expect the ensuing salvo of negative posts attacking everything from Microsoft, to proprietary software development, to Windows itself. All because I mentioned a new shell!

But the likening of David Korn's humiliation of the unsuspecting conference presenter to this thread is what finally made me step back and reconsider my participation here.

I mean, sure it's an entertaining story. It's fun to read about others' embarrassment, I suppose.

But why is it relevant here? Why is this thread similar to that story? Please explain.
 
Originally posted by: kylef
This is frustrating. I started off my first reply to this thread with a completely innocuous, positive post about MSH, providing a link in case no one had heard of it, and bringing some small bit of attention to the NT side of the shell world (something not many people know much about).

I certainly did not expect the ensuing salvo of negative posts attacking everything from Microsoft, to proprietary software development, to Windows itself. All because I mentioned a new shell!

But the likening of David Korn's humiliation of the unsuspecting conference presenter to this thread is what finally made me step back and reconsider my participation here.

I mean, sure it's an entertaining story. It's fun to read about others' embarrassment, I suppose.

But why is it relevant here? Why is this thread similar to that story? Please explain.

Maybe it's one of those "what we expect as compared to what we get" type of things. Some of us (like me) are pretty set in our ways, and if it doesn't work as we expect it to, it's junk (like bash 😉). I don't know. 😛

EDIT: And the story is amusing not because of how embarrased the man must have been, but in just the fact he was argueing with the guy that started the whole korn shell thing. Like in the movie Back to School, the English teacher thought the paper on Kurt Vonnegut(?) was crap, but Kurt actually wrote it.
 
I was curious about the story, so I found it. And I linked to it because I thought that other people might want to see it too. It was kinda funny.

That's all. If I wanted to realy bash microsoft I would be doing a lot more research then just that, I like to argue with facts.

(VirtualLarry was the one who brought it up, btw, and it doesn't have much to do with MSH anyways, that stuff is ancient history).

And I played around with pdksh a little bit, it's ok. I'll look into it further, but tcsh??? bleh.


edit:
unsuspecting conference presenter

That's interesting how you look at it that way though, the guy was hoisted by his own petard and you blamed it on Korn...
 
Definately want to take a look at MSH. To bad I don't have a win2003 machine laying around to play on it.

I always want to keep up on the latest stuff going on, in either camp. But moneys the issue here with me. Usually I can get this stuff free thru school, but I only have a math class left (that I am currently taking) and I don't know if that alone will qualify me for the free stuff.

(if you think this stuff is bad, just listen to what me and my freinds would get into with chevy vs ford. (I won that one though.. His newest vehicle is a big red chevy pickup with a nice small block 350. funny how that works.. to bad I now drive a dodge (what a major P.O.S.), good thing I didn't pay anything for it. 😛)
 
Originally posted by: kylef
This is frustrating. I started off my first reply to this thread with a completely innocuous, positive post about MSH, providing a link in case no one had heard of it, and bringing some small bit of attention to the NT side of the shell world (something not many people know much about).

Indeed, it was very interesting to me. I'm glad that you brought that to my attention.

Originally posted by: kylef
I certainly did not expect the ensuing salvo of negative posts attacking everything from Microsoft, to proprietary software development, to Windows itself. All because I mentioned a new shell!

But the likening of David Korn's humiliation of the unsuspecting conference presenter to this thread is what finally made me step back and reconsider my participation here.

I mean, sure it's an entertaining story. It's fun to read about others' embarrassment, I suppose.

But why is it relevant here? Why is this thread similar to that story? Please explain.

I'm sorry, this discussion of shells just reminded me of that humorous anecdote, and in a way, kind of seemed relevant to the discussion of shells here, and whether MS had "got it right" this time.

The subconcious implication was that MS never quite "gets it", with regards to the same sorts of though-processes and procedures that go along with *nix-style command-line system-administration practices.

The fact that I'm both a DOS/Windows user (along with some SunOS, VMS, and Linux experience), though their entire lines of OSes, and a "command-line guy", who's batch files tend to make mere mortal user cower in fear... and yet MS managed to "hide" a command-line-based registry manipulation tool so well that I never even noticed it... that kind of says something to how MS treats their command-line users, at least to me.

But the primary reason that I posted that, was in fact humor value for the geeks, and only secondarily and semi-tangentally related to this present discussion, the only real links being MS and command-line shells.

Also, command-line shells, are a "religious item" for those that use them daily, especially among *nix people. So any discussion of the relative merits of them, is bound to devolve into a "religious discussion" at some point, just like programming languages, choice of OS, or programmer's editor. So you have to at least expect this, when starting a thread about shells. 😉

PS. My comments in the other thread about W2K vs. XP, are directed against the "MS FUD party-line" (as I see it), and not you personally. I want to make that clear up-front. I would hate to have any "techie" decide not to post here on account of myself. I am a bit anti-MS, and I do rant a bit, but I try to make sure that I don't cross the line into making it personal, because that is never my intent. (Or if it is, I would make it very clearly obvious.)

PPS. Drag, thanks for finding that story again. It always makes me LOL reading it.
 
oh come one, we all know that microsoft is the devil and linux shall save the world!!

ok, just kidding.

MSH sounds really cool and all, but it just doesnt feel right to me that MS has spent so much time, effort, and $cratch to convince PHBs that their way is better. ive heard many microsofties and propaganda talk about how outdated the command lines and shells are and how a GUI can greatly decrease the pains of administration... then suddenly i hear that MS is going to make their own shell which it seems pulls many concepts out of unix shells? this jabber is all religous/political obviously, nothing technical. i'll be migrating our remaining NT4 servers to 2k3 later this year, so I will definitely give MSH a thorough test and post what i think on this forum.
 
You don't get MSH for w2k3... it's still a beta product. You have to sign up for a beta program and download it and install it seperately.

Definately not something I'd put on a production server.

It suppose to be part of "longhorn", and of course like all the technologies from that OS, it's still mostly non-existant. With w2k3, you have what? WSH? Windows SHell?

Here is a neat trick I learned from looking up stuff about ADS...

Go find a executable, any executable. A shell script, a virus, notepad.exe, then get another file, like a jpeg or plain text document, anything and try this out...
(at the c prompt)
c:> type notepad.exe > randomfile.txt:np.exe

Now you have embedded a executable....

You have to specify a path to run it,

c:> start ./randomfile.txt:np.exe

and it should execute. You can even embed this stuff into directories... Even c: and the interesting thing is that normally to get rid of the data stream you'd have to copy the file to something else with a different extention, delete the original, and then copy the copy back to the correct name. But if you embed it into c: you can't delete it.

Probably overwrite it though. Other interesting thing is that the Win32 API can't deal with this stuff properly, it's designed to sort of use it, but never was complete implimentation. For instance when you look at the properties of different volumes, they don't take into account the size of the ADS stuff, so that you can stick lots on information into a small file and normall file utilities and such would have no idea at all.

do:
dir randomfile.txt before and after and it will remain the same size.. but the directory will loose a few bits. Interesting implications, so if you have a "significatant other" that you need to hide your pOrn from, now you know how. 😛

Undocumented features are irritating, but entertaining... I definately need to get a Windows machine to play around with this stuff, I've neglected it for to long.
 
Back
Top