Slashdot Mirror


Which Shell Do You Prefer?

Pascal de Bruijn asks: "I recently started to use NetBSD, the first thing I noticed was that it didn't have a command-line history. So I immediately wanted to switch my shell, being on BSD my first instinct was to change to tcsh, but many people told me it wasn't any good. Others recommended zsh. I would really like to hear your opinions about shells." The submitter is particularly interested in shell memory usage, and the features you like...and dislike...from the current options that are available, today.

138 comments

  1. That's easy... by L.J.+Hanson · · Score: 1

    Korn Shell

    1. Re:That's easy... by mirabilos · · Score: 2, Interesting

      You basically use the /bin/ksh Korn Shell because it
      is part of the base system. It's the pdksh, not the
      ast-ksh, and it has basically every feature from GNU
      bash you would need (except man page and password
      auto-completion *g*). And it's free as in BSD licence.

      On GNU/Linux, where I usually have the choice between
      GNU bash and tcsh, I prefer bash (until I get to install
      pdksh) because it's a bourne shell (well, more or less).

      On BSD, however, I urge you to not install GNU bash,
      especially not as the root shell, because:
      - if you get used to it, it's harder to use other shells,
      e.g. if you're at anyone else's system
      - it's dynamically linked and resides in /usr/local/bin,
      whereas /bin/ksh and /bin/csh are statically linked
      (system rescue issues)
      - especially for root, I'd stick with the shells the system
      provides (security issues)

      So I think /bin/ksh fits you just fine.

      --
      My Karma isn't excellent, damn it! (And /. still does not get UTF-8 right in 2012. Wow.)
    2. Re:That's easy... by 42forty-two42 · · Score: 1

      - it's dynamically linked and resides in /usr/local/bin,
      whereas /bin/ksh and /bin/csh are statically linked
      (system rescue issues)

      Don't use a shell where it dosen't belong. System recovery should be done by sash. If all your utilities are shared libraries, other shells won't help much.
    3. Re:That's easy... by mirabilos · · Score: 1

      Hehe... this is not GNU/Linux, we have no /lib.
      OTOH you're right, and that for I have a rescue
      image here as well.
      I agree with "not again" :)

      --
      My Karma isn't excellent, damn it! (And /. still does not get UTF-8 right in 2012. Wow.)
    4. Re:That's easy... by cant_get_a_good_nick · · Score: 1

      - it's dynamically linked and resides in /usr/local/bin

      You can build it statically, and you can put it where you want. On the FreeBSD machines I used to administer, this is what I did. Built it static once, copied to /sbin. Don't confuse bad administration (dynamically linked root shell, on a file system thats not mounted on /) with bad Bash policies.

      You recommend ksh, then say stick with the shells the system provides. They provide ksh the same way they provide Bash, in the ports system.

      Pick whatever you want, just have good reasons for the decision.

  2. command line history by eXtro · · Score: 5, Informative

    did you try enabling it, it's off by default

    set history=1000
    - or maybe -
    history = 1000
    - or possibly -
    set history 1000

    I've never seen a shell without command line history, but I've logged into a lot of places where it wasn't turned on by default.

    1. Re:command line history by Anonymous Coward · · Score: 0

      No joke. It links to a restricted site with no information. wtf?

    2. Re:command line history by Doc_XII · · Score: 2, Informative
      I've never seen a shell without command line history

      /bin/sh (aka old school Bourne Shell) doesn't have a command line history.

    3. Re:command line history by eXtro · · Score: 0, Offtopic

      OK, I've updated my signature to point at more information. It was always sort of a placeholder till I wrote something up, so here it is.

    4. Re:command line history by rpresser · · Score: 0, Offtopic

      Neither does command.com. Anybody still using it?

    5. Re:command line history by MattCohn.com · · Score: 2, Informative

      cmd.exe does, that's what I use on my Windows box...

    6. Re:command line history by LizardKing · · Score: 2, Informative

      "set -o emacs" in NetBSD's standard Bourne shell will give you command line history. Nect time RTFM.

      Chris

    7. Re:command line history by Anonymous Coward · · Score: 0



      DOSKEY, you fucking nigger.......

      Haven't you ever used DOS?!?!

    8. Re:command line history by Anonymous Coward · · Score: 0


      Neither does command.com. Anybody still using it?

      Just one more example of another ignorant Linux zealot speaking out of his ass about windows with no clue whatsoever about what he speaks. Yeah, I still occasionaly use command.com and besides you being wrong, yer a fuckin idiot who gives a bad name to the OSS movement by spreading FUD about microsoft instead of spreading knowledge of the good things about OSS as you should be doing.

      "People should not hold strong opinions about things that they know nothing about."

    9. Re:command line history by Anonymous Coward · · Score: 0

      Yeah but does it log the history to a file so that you can access it in future logins?

  3. I just use Bash by streettech · · Score: 2, Insightful

    Bash baby!

    1. Re:I just use Bash by Anonymous Coward · · Score: 0

      YAY BASH!

      Lets face it, in the battle between C shells and Bourne shells, the bourne shells have won and bash is the most popular & widely used of the bourne shells. If you've only got 8MB of RAM, using a dif't shell might be a concern for memory reasons, but really, if your machine's that weak, why bother using it interactively?

    2. Re:I just use Bash by jo42 · · Score: 0, Troll

      Please, anything but bash - that Linux lump of shite...

    3. Re:I just use Bash by cant_get_a_good_nick · · Score: 1

      Linux lump of shite...

      Yes, I know this is a troll, but Bash isn't a Linux lump of shite, but a GNU lup of shite, written for the barely out of vaporware after 20 years GNU HURD. It just happens that they picked up the shell, and it's pretty much the Linux default. It has it s problems, but its my default shell for a lot of reasons.

  4. conch by dynoman7 · · Score: 4, Funny

    nuff said

    --
    Blarf.
    1. Re:conch by Anonymous Coward · · Score: 1, Funny

      I think you mean sea shell.

    2. Re:conch by rasteri · · Score: 1

      I hear they can be used as a useful tool for democracy, too.

    3. Re:conch by drgnvale · · Score: 1
      >> I hear they can be used as a useful tool for democracy, too.

      Until it gets smashed into Piggy's head...

  5. Huh? by Anonymous Coward · · Score: 3, Informative

    I recently started to use NetBSD, the first thing I noticed was that it didn't have a command-line history.

    It? Command-line history isn't a feature of an operating system, it's a feature of a shell.

    my first instinct was to change to tcsh, but many people told me it wasn't any good.

    Read csh programming considered harmful. It's not really sensible to write shell scripts using one shell and use another, so steer clear of csh.

    Many people like zsh for it's completion routines, but I believe bash has similar facilities by now.

    1. Re:Huh? by AtrN · · Score: 3, Informative
      Command-line history isn't a feature of an operating system, it's a feature of a shell.

      It can be a feature of the operating system. With pty's you can insert arbitrary filters into the input stream allowing consistent editing across all programs that do terminal input. I've used ile in the past to do this. The benefits include one editor interface and programs not needing to know about and include the editor. There's a trade off (of course), without knowledge of the editor the programs can't tailor it to specific uses, such as programmable completion. It could be but the editors need to provide facilities to allow such control and they don't AFAIK. It would nice if they did.

    2. Re:Huh? by Malcolm+MacArthur · · Score: 1
      It? Command-line history isn't a feature of an operating system, it's a feature of a shell.

      VMS... single line recall is built into the terminal device driver.

      Anything more than a single line, that's up to the application to handle :)

    3. Re:Huh? by SecretAsianMan · · Score: 1
      Thus spake AC:
      Command-line history isn't a feature of an operating system, it's a feature of a shell.
      Not all operating systems separate the operating system from the shell. That separation was actually one of the original UNIX's celebrated features.
      --

      Washington, DC: It's like Hollywood for ugly people.

  6. bash by pizza_milkshake · · Score: 0, Offtopic

    it's sexy

    1. Re:bash by SN74S181 · · Score: 3, Insightful

      bash is an extend-and-embrace version of /bin/sh: it encourages people to write broken shell scripts.

      On some of the GNU systems, i.e. Linux, /bin/bash is the automatic replacement for a nonexistent /bin/sh, so people write what they think are generic shell scripts, but carelessly include bash-only features. Then their scripts won't work on systems without /bin/bash.

      bash is sorta like Microsoft's Java implementation in that way.

    2. Re:bash by divbyzero · · Score: 3, Insightful

      Whatever the intentions of Bash's authors with regard to "embrace and extend" tactics, it can be used perfectly safely, and may well be convenient for the poster.

      Bash is one of those programs which acts differently depending on the filename of its executable. When invoked from a copy or a link named /bin/sh, it emulates the traditional Bourne shell without GNU extensions.

      Thus, always write your scripts with the traditional #!/bin/sh shebang. If Bash is masquerading as Bourne, it won't hurt you that way. You can still benefit from Bash's extensions for interactive use (such as command editing and history) by setting your shell to /bin/bash via chsh.

      --
      But my grandest creation, as history will tell,
      Was Firefrorefiddle, the Fiend of the Fell.
    3. Re:bash by massive-cow · · Score: 1

      How on earth was this modded up?

      This is a complete troll - there is absolutely no comparison between a closed system specifically *designed* to provide incompatible extensions and a much superior shell which has become the defacto standard for *many* years.

      Can you find me a platform that doesn't have bash available, but does have sh? If you can, you have the source, you can port it yourself.

      Do you suppose you can compile Win32 code on a Win3.1 compiler?

      That about describes the generation leap. I'd say that bash does a pretty damn good job of augmenting the old shell.

      Did I just get trolled?

      --
      Simplicity is prerequisite for reliability. - Dijkstra
    4. Re:bash by RLiegh · · Score: 1

      Can you find me a platform that doesn't have bash available, but does have sh?

      Defining 'available' as 'included with the base distribution' (meaning, excluding rpm, pkg_add, etc).

      Solaris; at least up to 8 (at least, it isn't on the cd I downloaded.)
      NetBSD, as already mentioned.

      Do you suppose you can compile Win32 code on a Win3.1 compiler?

      Depends on the code, and wether or not you
      A)Are using Borland 4.5 or not (maybe openwatcom too?)
      B)Have installed win32s (included w/ Borland 4.5)

      Did I just get trolled?

      IN SOVIET JOURNAL the TROLL is YOU!
  7. I prefer... by orthogonal · · Score: 3, Funny

    Conch shells.

    If your plane crashes on a deserted island, and you get the conch shell, you 0\/\/n3rs the island.

    1. Re:I prefer... by Rudeboy777 · · Score: 1

      Try telling that to Piggy. F**king boulder-drop h4xx0rz

      --

      From hell's heart I fstab at /dev/hdc

    2. Re:I prefer... by Anonymous Coward · · Score: 0

      clam shell...

    3. Re:I prefer... by Anonymous Coward · · Score: 0

      I prefer bearded clam.

  8. bash by Apreche · · Score: 3, Insightful

    I like bash. It's common, fairly standard. It has history and tab completion. That's all I really need or use. I have it in linux/solaris/cygwin so I'm rarely forced to use something else. Never really cared or needed to use something else.

    --
    The GeekNights podcast is going strong. Listen!
  9. Battlestar Galactica by stefanlasiewski · · Score: 2, Funny

    Personally, I prefer Emacs, because VI doesn't have enough features.

    Actually, wait, I prefer Gnome, because I dislike KDE's philosophy in duplicating technologoies that already exist, but in the "KDE" style...

    Enterprise vs. the Battlestar Galactica? Enterprise, baby! Battlestars always catch on fire, as if they were made of rice-paper.

    No wait, wait... this is about shells. Gosh, I've never used a shell. What is it?

    --
    "Can of worms? The can is open... the worms are everywhere."
  10. I use gdb by sigwinch · · Score: 3, Funny

    Hands down the most powerful shell there is.

    --

    --
    Kuro5hin.org: where the good times never end. ;-)

    1. Re:I use gdb by red_dragon · · Score: 1

      Gdb? Bah! I use debug! "-g c800:8" Try to top that! ;)

      --
      In Soviet Russia, Jesus asks: "What Would You Do?"
  11. Stupid users... by darken9999 · · Score: 2, Funny
    What a dumb question. Ask Slashdot is really going downhill. Newbies need to use Google like us 1337 users.

    Shells

    1. Re:Stupid users... by TheCrimsonUnbeliever · · Score: 1

      This is something that bugs me from the *nix community

      Sure he could google for shells - But does that give him end user opinions in an interactive format?

      No

      That is why he asks - To find out what YOU think

  12. zsh by dhall · · Score: 3, Informative

    I originally chose this shell back in '92 for the right hand prompt. A 'spiff' feature for a shell chocked full of features. It was also the first shell to have a truly programmable completion. It has all the interactive add-on's for tcsh, with the base template built off of Korn Shell (so you don't have issues with scripting in something separate from a Bourne derivative).

    The z-shell is so filled with features at this point, it's nearly become the "emacs" of shells, and yet, it's memory footprint for the same tasks is smaller than either bash or tcsh.

    1. Re:zsh by frosencrantz · · Score: 1
      I'm a huge fan of zsh and highly recommend it to anyone to switch. Several years ago I was a die hard tcsh user. Zsh is really much better. (There is some help on switching to ZSH . This link includes information on how you can use the bash completion functions within zsh, and conversion tools for tcsh completions.)

      If you use bash, switching to zsh is very easy. If you are a power bash user, you might have some problems getting reoriented, but will love the power of zsh. If you use tcsh, it will take a little getting use to all the sh-like things, but the transition is not too bad, since many csh features are still available.

      Another poster listed three criteria to use to pick an interactive shell. (I've used bash, but not extensively, and I haven't used tcsh for 3 or 4 years....)

      • Interactive usage This is the most important to me, since this is 97% of time how I use the shell. In addition to the basics like interactive editing that both bash&tcsh have. Some of the extras in zsh I really like:
        • Completion Zsh does this much better than bash&tcsh. Zsh comes bundled with many completion functions, and they are much more through than any available for tcsh/bash. Plus they provide descriptions/help text, which no other shell can do. Bash's completion is based on a earlier version of the current zsh completion system. Zsh can run bash completions... There is a conversion script to convert tcsh completion commands to zsh.
        • Matching specs Allows for smart case-insensitive completion, abbreviations, etc. The ability to type "read{Tab}" and get "README" or type "m.1{Tab}" to get "messages.1" is really great. Tcsh has something like this if you set completion to enhanced. I'm not sure if bash has this, but I believe not...
        • Correction Zsh can correct typos during completion. Wonderful for a bad typist like myself. I don't believe bash or tcsh can do this. Tcsh has some correction code but only after hitting "Enter".
        • Great globbing In addition to the standard globbing *,?, {}, and []. Zsh has extended globbing which let's you emulate the find command within a glob pattern. The big one for me is **, which is a recursive *. So, **/file.c will find all the files named "file.c" in current directory tree. Also it has number ranges (e.g.photo<10-33>.jpg)
        • Configurability Zsh has zstyle configuration command, which while complex, does provide a lot of control.
        • Command line editing The zsh line editor can be scripted (new keyboard commands). Bash is based on readline, and provides some configuration to change which keys do which command, it doesn't provide a way to script AFAIC determine. I don't believe tcsh has this either.
      • Scripting There are times you want to improve your shell experience with scripts that need to be written in the script of your shell. But for other tasks, use a portable scripting language (e.g. Bourne shell, perl, python, etc.) Though zsh is POSIX compliant, and the scripting language is as useful as bash. Zsh has my csh favorites like foreach, and variable modifiers (e.g.$file:r). Also, zsh does a great job at editing multiline commands.
      • Availability This can be an issue w/zsh. Zsh is not as widely available as bash. Though most free versions of *nix like Linux and *BSD have zsh available, (though not always the latest or by default installed). I typically build from the latest CVS sources, it's almost always stable. And the process is very easy (configure/make/make install). There are many platforms where bash or tcsh
    2. Re:zsh by Anonymous Coward · · Score: 0

      The zsh memory footprint is far heavier than bash's. I recently switched from zsh back to bash on my (old, slow) laptop for just that reason.

      I just fired up zsh for comparison purposes. bash's memory hit is 1264/772k, with zsh at 6864/3232k. That's 4-5 times heavier than bash, and it's slower to boot (particularly in the completion department - you pay for all that power). I still run zsh on my fast boxes with plenty of ram, but it's hardly faster or smaller than good old bash.

  13. bash by dacarr · · Score: 1
    I like bash, but I'm biased. I've always been partial to bash and emacs.

    My wife thinks I'm insane, but I'll show her! I'll show them all!

    --
    This sig no verb.
  14. Which Shell? by Captain+Large+Face · · Score: 3, Funny

    Royal Dutch?

    "When you absolutely, positively have to murder every Ogoni protester in the Niger Delta, accept no substitute."
  15. While history is nice... by burns210 · · Score: 1

    While features like a commandline history are nice, while you are at it, why not try something like the MUD Shell or the New Adventure shell? Instead of some plain black, dull shell, spice unix up with a gameplay like feeling. Interestingly, The MUD shell, was inspired by a posting at... Slashdot!

  16. 4NT baby ! by UnknownSoldier · · Score: 1

    Tab and Shift-Tab to *cycle* thru filenames, along with a hotkey to toggle between long and short filenames, just rocks when stuck on a Windows (2K/XP) box.

    When on a *nix system, bash.

    1. Re:4NT baby ! by sirsampson · · Score: 1

      cmd.exe on 2k/xp all the way, it's default and you know it's there :)

      seriously though, zsh is my shell of choice right now. bash, of course, is my second choice.

    2. Re:4NT baby ! by Anonymous Coward · · Score: 0

      You got it baby!

      4NT kicks any unix shell in the butt.

      Ctrl-pg-up == list of directories last visited
      pg-up = list of commands last typed (in a popup)

      select command (*) runs the command AFTER you get to select the files.

      global command runs the command recursively.

      the list goes on and on.

      when on unix, I use Ksh.

  17. Duplicate! by orkysoft · · Score: 1
    --

    I suffer from attention surplus disorder.
    1. Re:Duplicate! by sirsampson · · Score: 1

      Maybe /. is trying to come out of it's shell.

    2. Re:Duplicate! by orkysoft · · Score: 1

      Looks like you could be a Slashdot Editor! :-P

      --

      I suffer from attention surplus disorder.
    3. Re:Duplicate! by sirsampson · · Score: 1

      hehe, well, my spelling and grammer are horrible, but the question is are they bad enough :)

    4. Re:Duplicate! by orkysoft · · Score: 1
      hehe, well, my spelling and grammer are horrible, but the question is are they bad enough :)

      So, how's about your grammar? ;-)

      --

      I suffer from attention surplus disorder.
  18. Bash is the One True Shell, ksh is very close by afabbro · · Score: 4, Informative
    Yes, I'm (mostly, as much as ever) serious.

    When picking a shell, you should consider:

    • how easy it is to work with interactively
    • how easy it is to code (yes, I write 99% of my stuff in perl or whatever, but you will need to script some day, mark my words...if nothing else, system startup scripts for Solaris, AIX, etc.)
    • how standard is it on what type of Unices you work on.

    The candidates:

    sh is too primitive in terms of user features, period. No one uses the Bourne shell if they can help it.

    csh/tcsh...well, google for "csh Programming Considered Harmful" to see its many internal bugs. Also, most of the major Unices don't use it (Solaris, AIX, Linux - I guess *BSD might still) for their system stuff. If it's not considered a good scripting platform AND most Unices don't use it for their scripts...

    zsh - From what I've read, a good shell, but very nonstandard. Do you really want to lug a shell around and install it (and set up /etc/shells or whatever each time, etc.) for every machine you log into?

    ksh - sh scripting with all the good interactive features. A really solid shell and a very good choice. All the sh goodness with the t/csh interactive features added.

    bash - I think bash is a little better than ksh because some of its interactive features are better. Tab-completion is better than ESC-\. The way the shell handles tab completion is better (X possibilities, do you want to see?) Lots of little things like that. Benefits greatly from reimplementing ksh. Installed by default on all Linux distros (except tiny niche players) and Solaris since Solaris 8...easy to build and install on AIX or *BSD (and HP-UX I'd guess, I don't know)

    bash is the best shell in my opinion and I have no qualms about defending it. ksh is a reasonable second choice and some people prefer it. zsh may be in the running but never caught on widely. Everything else is inferior.

    --
    Advice: on VPS providers
    1. Re:Bash is the One True Shell, ksh is very close by mivok · · Score: 1

      The parents subject pretty much says it all. One other issuee is licensing, I was surprised to find that bash wasnt installed by default when I installed OpenBSD, until I realised one of the aims of *BSD is to avoid GPL software.
      To be honest, the only real difference I noticed between the two was that ksh didnt support my nice luverly coloured bash prompt (which probably says more about how I use the shell than how different they are).
      However, tab completion worked in ksh, unlike what I took the parent to be suggesting.

      Of course theres always the new adventure shell.

    2. Re:Bash is the One True Shell, ksh is very close by 0x0d0a · · Score: 2, Interesting

      Not bad, but here are my own feelings.

      I've never even used sh (just bash...)

      csh/tcsh are significantly less popular than the others -- their main users are BSD fans.

      zsh is relatively heavyweight, but I really like it. If there's a feature, zsh has it. I particularly like colorized tab completion. It's got a lot of bash and ksh's features combined. It's true that it's less common than bash.

      bash is the most common, easily. It's a pretty safe choice.

      I haven't been too impressed with other shells. perl shell isn't that great for actual use, the Plan 9 shells like rc lack job control.

    3. Re:Bash is the One True Shell, ksh is very close by briaydemir · · Score: 1

      csh/tcsh...well, google for "csh Programming Considered Harmful" to see its many internal bugs. Also, most of the major Unices don't use it (Solaris, AIX, Linux - I guess *BSD might still) for their system stuff. If it's not considered a good scripting platform AND most Unices don't use it for their scripts...

      No one said the shell you use has to be the one you program in. I prefer to use tcsh for my interactive shell (it does everything that I need it to), but use sh for shell scripting (since it's on every platform I work on).

    4. Re:Bash is the One True Shell, ksh is very close by keramida · · Score: 3, Interesting
      No one said the shell you use has to be the one you program in. I prefer to use tcsh for my interactive shell (it does everything that I need it to), but use sh for shell scripting (since it's on every platform I work on).

      True, true. There are times though that one has to type on the prompt things like:

      $ for fname in $( cmd | sed | awk | grep ) ; do \
      stuff "${fname}" ; done

      The scriptability of the shell right there on the command prompt, is probably the only reason I use bash as my login shell even on BSDs.

      --

      --
      My other computer runs FreeBSD too.
    5. Re:Bash is the One True Shell, ksh is very close by photon317 · · Score: 1


      Ditto.

      At one point I was a staunch supporter of tcsh as a login shell. I had read about and experienced the ugliness of *csh for scripting, but I still preferred tcsh's immensely good interactive interface.

      But every now and then, I want to do a quick loop or some other simple scripting construct right there on the commandline, and I would actually run some bourne derivatite from my tcsh commandline just to do it and then drop back. Eventually I got more and more annoyed with that, and along the way Bash picked up a lot of the really good features (like advanced context-sensitive command completion) that tcsh had, so it only made sense to give up and go bash.

      --
      11*43+456^2
    6. Re:Bash is the One True Shell, ksh is very close by eyez · · Score: 3, Informative

      csh/tcsh...well, google for "csh Programming Considered Harmful" to see its many internal bugs. Also, most of the major Unices don't use it (Solaris, AIX, Linux - I guess *BSD might still) for their system stuff. If it's not considered a good scripting platform AND most Unices don't use it for their scripts...

      Um. I'm sorry, but I don't see how (t)csh scripting equates to it's value as a login shell. Yes, it can be ugly to script in csh, mainly due to it's lack of function support, but it's a very nice shell to use for day-to-day use. It's completion system is extremely sane, and it has lots of extra convenience setups, and many cool extras.

      zsh - From what I've read, a good shell, but very nonstandard. Do you really want to lug a shell around and install it (and set up /etc/shells or whatever each time, etc.) for every machine you log into?

      Zsh is actually my favorite shell. The way I have it set up, if I run into a machine where zsh isn't available, I have a backup tcsh config which works very similarly to my zsh config. Thing is, most of what I do with zsh also works on bash, too.

      Of course, that's not WHY I use zsh. Well, it may be part of it, but more importantly is that zsh really is designed to be the most configurable shell around. you can make it do /anything/, given a certain varying amount of work. I'm far too tired to go into any sizeable amount of detail about it, but there's plenty of documentation on zsh's site.

      My point, though, is that EVERYTHING bash can do, zsh can do at least as well and often better. So even if you have the extra power of ZSH on your most-used machines that you may have control over (and many administrators, as long as they're not total jackasses, will listen to someone who asks for a zsh install), and another shell (I use tcsh because i like the syntax of their while/if/etc stuff better, but it doesn't matter that much) anywhere you can't get it, and not suffer too badly over it. You'd just miss out on the extra nicenesses of zsh on machines you didn't have the authority/energy to make it work on.

      And one smaller point: Zsh's POSIX-sh compliance is actually better in compliant mode than Bash's is in sh-compliant mode. You really do get a lot out of zsh as a shell, even if it can be a bit harder to configure.

      --
      get 0wned. irc.w30wnzj00.com
    7. Re:Bash is the One True Shell, ksh is very close by GuyWithLag · · Score: 1

      Damn, I'm watching too much TV these days... I mis-parsed the title as *Bush* is the One True Shell...

    8. Re:Bash is the One True Shell, ksh is very close by 91degrees · · Score: 1

      One criticism with bash is that it's a little bloated. Hardly a problem these days, I guess, but 512K is quite a lot for a command line.

  19. TCSH by Anonymous Coward · · Score: 0

    EVERYTHING ELSE IS INFERIOR.

  20. i don't know by syrinx · · Score: 1

    I'm not a shell guru, so my opinion doesn't matter much, but I use bash or tcsh. *shrug*

    --
    Quidquid latine dictum sit, altum sonatur.
  21. GDB is my shell. by Anonymous Coward · · Score: 3, Funny

    Real men have a perl script to search through all .h's and .so's on the system, and make up an executable including and linking them all, and just printing "hello, world.".

    Then they run that in GDB and break. Instead of rm they use "p unlink("file");" Occasionally they might break down and use "system("shell command\n"); but only if no one is looking.

  22. shell by Hard_Code · · Score: 1

    On AIX machines I use tcsh as my interactive shell, but write scripts in ksh, and drop into ksh if I want to test something out. ksh is great for scripting but really sucks for interactivity.

    On Linux machines I go with Bash...it's the best of both worlds, but does use a lot of memory at cold start (~5 megs last time I checked).

    I've heard great things abotu zsh, but haven't really tried it.

    By the way, does anybody else think that readline is the most evil thing on the face of the earth?

    --

    It's 10 PM. Do you know if you're un-American?
  23. I'm a big fan of... by Anonymous Coward · · Score: 0

    4NT (and 4DOS and 4OS/2). That whole line of 4* shell products is really great.

  24. Zork shell! by tm2b · · Score: 4, Funny

    I prefer the adventure shells.

    The core cannot defend itself. It dies.

    --
    "It is our blasphemy which has made us great, and will sustain us, and which the gods secretly admire in us." - Zelazny
  25. Shells aren't for scripting. by mellon · · Score: 4, Interesting

    We use bash/bourne shell for scripting because it's available on every operating system, and its behavior is reasonably predictable. It would be insane to write a shell script in tcsh, for example (not that I haven't done it... :').

    However, if you really want to write a quick script, something like Perl or Python is a better choice, unless you really need that portability. And if you really want a nice UI, well, you should use what works for you.

    On that basis, I use tcsh. it is not superior to bash - if anything, bash is, taken as a whole, superior to tcsh. Likewise ksh. But I'm not using all the features of ksh or bash, and because of my own personal history - what I imprinted on - I find tcsh much more predictable. Its behavior is also more similar to emacs' behavior than bash's behavior, and I use emacs. So for me, tcsh is the right choice.

    You said you use tcsh elsewhere. So to some degree you've probably imprinted on it. It's brave of you to decide to check out the competition, but it's going to come down to a matter of personal preference, so my advice to you is to personally check out the competition - don't take our word for it. This is a productivity tool, so pick the one that works nicely for *you*.

    Having said that, the obvious competition to tcsh is bash, and it's getting to the point where it's pretty much ubiquitous, so that is what I'd suggest you check out. Switch to bash for a month. Try to customize it to your liking. After a month, switch back to tcsh. If you find yourself missing bash, switch back to bash. If you find yourself happy and relieved to be back home, stick with tcsh. If you find yourself still on the fence, use bash, because it's more likely to be installed on random machines that you log into (into which you log?).

    1. Re:Shells aren't for scripting. by Quixotic+Raindrop · · Score: 2, Interesting

      [...] because it's more likely to be installed on random machines that you log into (into which you log?)

      "into which you login" would be best, I think :)

      I've been a *BSD & Linux user for many a year now, and I was first introduced to tcsh. The Sun OS 5.4 machine that I first logged into had csh, IIRC, and after a while of back & forth between Sun OS 5.4 and BSDI on the school machines, I settled on using tcsh. I find bash to be annoying from time to time, but like many others here I don't do shell scripting. I always use Perl. It just seems to be a cleaner solution. Maybe I'm weird.

      --
      Only two things are infinite, the universe and human stupidity, and I'm not sure about the former. (Einstein)
    2. Re:Shells aren't for scripting. by jsgf · · Score: 2, Insightful
      However, if you really want to write a quick script, something like Perl or Python is a better choice, unless you really need that portability.
      It is actually pretty hard to write a portable script with a shell. Any non-trivial shellscript has many external dependencies on commands, and its hard to use a subset of commands and features which is common across a wide range of machines.

      And then you get things like sort behaving in unexpected ways depending on the locale settings...

      In general I've found you get best portability from the portable subset of C; perl and python are pretty good, so long as you're careful to only use standard packages.

  26. This should have been a survey by n1ywb · · Score: 2, Insightful

    But bash gets my vote. I had the same problem when I installed NetBSD. I had to suffer through using sh untill I could networking up. Bash was the first thing I downloaded.

    --
    -73, de n1ywb
    www.n1ywb.com
    1. Re:This should have been a survey by SN74S181 · · Score: 1
      Here's a bit of a text capture from a NetBSD box:
      rodger: {4} cat /etc/passwd
      root:*:0:0:Charlie &:/root:/bin/csh
      toor:*:0:0:Bourne-again Superuser:/root:/bin/sh
      daemon:*:1:31:The devil himself:/:/sbin/nologin
      operator:*:2:5:System &:/usr/guest/operator:/sbin/nologin
      bin:*:3:7:Bin aries Commands and Source:/:/sbin/nologin
      news:*:6:8:Network News:/var/spool/news:/sbin/nologin
      games:*:7:13:& pseudo-user:/usr/games:/sbin/nologin
      postfix:*:12 :12:& pseudo-user:/var/spool/postfix:/sbin/nologin
      name d:*:14:14:& pseudo-user:/var/chroot/named:/sbin/nologin
      ntpd: *:15:15:& pseudo-user:/var/chroot/ntpd:/sbin/nologin
      sshd:* :16:16:& pseudo-user:/var/chroot/sshd:/sbin/nologin
      ralph: *:100:100:ralph:/usr/home/ralph:/bin/csh
      I hope you noticed that the default shell in NetBSD is /bin/csh. Where are people getting this information that the default shell in NetBSD is /bin/sh ???
    2. Re:This should have been a survey by Anonymous Coward · · Score: 0

      I see the most popular shell is nologin. Funny, that is the same shell my administrator gave me too!

  27. A few more details by devphil · · Score: 5, Informative


    Some random facts:

    • Anyone spending more than a brief amount of time on a *nix system should learn how to use the basic sh commands, even if it's not their login shell? Why? Because 1) most system-level scripts are written in sh, and 2) when major programming languages perform a "shell" call, e.g., system(), it uses sh to do the work.
    • There is a POSIX specification of sh which cleans up all the wacky historical bugs. The resulting shell is actually ksh.
    • The csh/tcsh family were originally meant to be more friendly to programmers (a C-style syntax), but it all seriously backfired. Every other shell allows the user to write subroutines. Not csh. Instead, you get a goto command. No, I'm not joking.
    • tcsh is just some user-friendly features added to csh, but the annoyances and lack of comparative features just doesn't make up for it.

    The only real choices today as far as user login shells go are bash 2.x, ksh (ksh93, not ksh88), and zsh, all of which continue to cross-pollinate good ideas.

    --
    You cannot apply a technological solution to a sociological problem. (Edwards' Law)
    1. Re:A few more details by geoswan · · Score: 1
      It has been something like twenty years since I looked into the Joy(*) shell, to see if I should spend the energy to try to master it.

      As I recall, one of the drawbacks to writing shell scripts(**) in the Joy shell was serious awkwardness in redirecting a program's standard error. And redirecting of higher file descriptors was not possible. Although I can't recall every seeing a shell procedure that used this feature.

      Rob Mashey wrote a shell for PWB/UNIX (the "Programmer's Workbench UNIX"), which was about the same vintage as version seven UNIX, the version that introduced the Bourne shell. I read a paper he wrote, for a journal called "Software Practice and Experience", called something like, "Using the command line interpreter as a programming tool".

      I just did a google search for Mashey, and I came across the man page for the Thompson shell. Interesting.

      In his paper Mashey described an experiment the PWB team conducted, in writing a compiler for shell procedures. It was a waste of time. The compiled versions were larger, were unreadable, and they didn't run any faster. Profiling revealed that most of the time the shell took was spent invoking the two system calls fork() and exec(). Back in those days test was a separate binary.

      (*) If the Bourne Shell is named after Steve Bourne, and the Korn Shell is named after David Korn, then the C shell should be referred to as the Joy shell, since Bill Joy wrote it.

      (**) Actually Steve Bourne doesn't call them "shell scripts". He calls them "Shell Procedures". So that's what I call them. I figure he should know.

    2. Re:A few more details by xsbellx · · Score: 1
      Why? Because 1) most system-level scripts are written in sh, and 2) when major programming languages perform a "shell" call, e.g., system(), it uses sh to do the work.

      This is not always true. For example, with AIX, /bin is a symbolic link to /usr/bin. /usr/bin/sh is linked to /usr/bin/ksh, the i-nodes are the same. So any of the following result in a Korn shell:
      #!/bin/ksh
      #!/bin/sh
      #!/usr/bin/ksh
      #!/ usr/bin/sh

      And before anyone jumps on me, I know AIX really stands for "Ain't Unix" but I figured the pot needed a little stirring.
      --
      If VISTA is the answer, you didn't understand the question
  28. zsh by honold · · Score: 4, Informative

    i was convinced by adam spier's page and the zsh faq to give zsh a try - it was even a netbsd system that prompted it. i got sick of administering freebsd/opensbd/netbsd with different shells and i wanted to standardize on something with the features i wanted.

    bash was tried first, but when i started playing with misc options like vi mode, got deeper into completion, etc i realized that bash/ksh weren't appropriate long-term choices for me. auto cd to directories, amazing completion options, typo correction, shared history, and a proper vi mode (see this for the confession from gnu's docs).

    'knowing' zsh will largely translate to bash/ksh systems when you use them and zsh is not available - you'll just be reminded of their shortcomings :) the basics are largely identical.

    the new unix power tools book also makes much mention of zsh.

  29. Python script by peripatetic_bum · · Score: 0, Offtopic

    I've only begun leanrning unix, IM a system admin at a small non-profit. I actually find it my easier to write python scripts for things that would normally require bash scripts.

    Could I hear your thoughts about this approach?
    Thanks

    --

    Sigs are dangerous coy things

    1. Re:Python script by Meowing · · Score: 2, Interesting

      Even though Python has a fairly nice interactive mode, it makes for a really lousy general purpose shell. You certainly can create processes, plumb them together, redirect their stdio and all that, but not in the concise manner one expects from a CLI. People have tried to write shells around Perl, Python and similar languages, but these things tend to fail in the usability department, which is why hardly anyone actually uses them. Possibly such a thing could be written and not suck, but it hasn't happened yet.

  30. Bash by n1k0 · · Score: 0

    Bash.

  31. what the fudge? by josepha48 · · Score: 3, Insightful
    Hmmm.

    This is a preference thing more than anything else. If you want tcsh on NetBSD cd /usr/pkgsrc/shells/tcsh && make install

    I've used csh, sh, tcsh, ksh, and bash. I think at one point I used zsh. I found that tcsh, bash and zsh are usually similarly setup, and allow using the arrow keys and tab completion. History is something that you set up, and in these 3 shells its always been setup for me. In using ksh, csh and sh, my experience was eew eew eew, but that is just me. I was used to bash at that point. Bash can be a hog or so I am told. I never measured, ub tit does a lot and it is probably not something you'd want if you were building a flopy based distro. Tcsh is not that bad, and can be added nowadays to just about any UNIX platform. Zsh is supposedly better, but I never used it enough to know if it truely was.

    If you are going to do shell scripting then I'd suggest sh for shell scripting. Of course you can write scripts in sh and use tcsh or any other shell if you know what you are doing. Uisng sh for scripting is more portable than perl, tcsh, ksh or bash, as sh is going to be on all modern unix systems. Perl may be on all systems, but don't rely on it. Csh does not allow shell functions, which are kinda handy. Ksh is Suns shell (I think) and I know it is not available on every platforms.

    What do you prefer to use that is the real question. Personally I can make just about any shell work for me if I have to....

    --

    Only 'flamers' flame!

  32. bash by Yuan-Lung · · Score: 1

    Personally I'd use bash. The primary reasons I guess are it's resamblance to ksh, my previous perference, and the fact that it comes default with RH linux, which I am running here.

    Besides command line history and editing, I perticularily like the tab search feature. It's saved me a lot of effort typing full paths.

  33. Korn shell by Cuchullain · · Score: 3, Interesting

    Korn is a great shell, and he is constantly working on it, so it is getting better and better.

    It is the shell I find most often on the commercial boxen that I need to work with, so I use it on linux and freebsd too. I'm certain that there is a version available for netbsd too. pdksh is a distant second to the real thing, so go grab the official ksh! It isn't pure from an open source viewpoint, but I am answering in terms of practicality not idealism.

    You can grab it from att labs' page if I remember correctly. It is the gold standard for 'correct' behavior as far as I am concerned, and is what you will find on a whole slew of different *nix boxes.

    I try to avoid bash, because though it is a really nice shell, I never find it on commercial systems, and I want my shell to behave consistently wherever I am.

    Cuchullain

    --
    "If sharing a thing in no way diminishes it, it is not rightly owned if it is not shared." -St. Augustine
    1. Re:Korn shell by rkhalloran · · Score: 1
      The Labs open-sourced ksh as of August 2000. Head to kornshell.com for source and binary builds for The Usual Systems.

      Have to agree with the above poster, commercial systems at this point will have it, and it's available open-sourced for Linux, so I use it as my preferred shell between the Sun boxes I use at work and the Linux desktops I reach them through.

    2. Re:Korn shell by cant_get_a_good_nick · · Score: 1

      I try to avoid bash, because though it is a really nice shell, I never find it on commercial systems

      Solaris 2.8 ships with /bin/bash (bash 2.0.3)

  34. rc by AtrN · · Score: 1

    Somewhat saner syntax in places but missing a couple of things. It is nice and small however.

  35. Use what is native to your system by mpechner · · Score: 1
    I use a CSH dirivitive on systems with use the for most shell tools. i.e. BSD.

    I use a sh derivitive on Unix/Linux machines. I prefer in order of preference bash, then korn, then tcsh, csh, sh

    Command line editing and history is important during normal use. After than it is the programming structures you prefer.

    Being someone who was weaned on a Altos running System 7 back in 1984, I prefer bourne shell dirivitives.

  36. duh (-1 redundant) by GiMP · · Score: 4, Funny

    I'll be modded down for this but:

    root shells.

  37. non-nix shells by kfx · · Score: 2, Interesting

    Granted, this topic is geared towards nix shells, but when you're stuck with windows no shell comes close to rivaling the power and flexibility of LiteStep.

    1. Re:non-nix shells by cant_get_a_good_nick · · Score: 1

      Cygwin comes with ash, ksh, bash, and zsh in the default install, you could pretty much build any shell.

      I need to cheeck out LiteStep, does it integrate into the system well? One problem with Cygwin is it's only aware of Cygwin processes - a ps or top won't show you IE for example.

    2. Re:non-nix shells by kfx · · Score: 1

      The thing about litestep is that it is designed specifically to be a windows shell, not a port from *nix... As such it is designed to integrate with windows (and will show any tasks windows shows, to answer your question). There are many user-made module dll's available and you can either download a premade theme (which will use certain modules) or brew your own. All it takes is a little bit of graphic skill and a text editor.

      For example, in my self-made theme I have (screenshot) the Popup Menu, a calendar, clock, VWM, winamp 2.x integration, a systray with another module to put tasks in the tray, and more.

      Thats the beauty of Litestep--it is whatever you want it to be. You can build your own theme to suit your needs, or look around online to find minimalistic themes, gnome-like themes, kde-like themes, eyecandy themes, or just about any other kind you could want. I highly reccommend that anybody still using explorer as their windows shell give litestep a spin. Theres a bit of a learning curve if you want to make your own theme (which is ultimately the best way to go, since you will have a theme that's exactly the way YOU want it to be), but believe me, it is WELL worth it.

  38. Bash gets my vote by klui · · Score: 2, Informative

    When I first used UNIX, it was ksh. I had gotten used to ESC-ESC for name completion. Then I got my NeXT and liked TAB for completion under csh. Much better. When I found out that bash had the same thing but TAB-TAB prints all possible matches, I was hooked from then on. Plus, much of the settings are the same as ksh and scripting is about the same.

    I tried zsh but its man page is like Perl's, referencing a bunch of other man pages, making navigation/reference cumbersome. tcsh's configuration is different enough from [bk]sh's that I stopped using it in short order.

    So it's bash for me. It's a good thing bash is available under OS X. Early versions had only sh, csh, and tcsh and things were painful. Recent versions have all those, including bash and zsh.

  39. My favorite shell... by Anonymous Coward · · Score: 0

    is EXPLORER.EXE in Windows XP.

  40. NetBSD's default shell has a history... by SN74S181 · · Score: 2, Informative

    There certainly is a history in the default shell (/bin/csh) on NetBSD. Type the 'h' command to see your numbered command history. Then type, for instance !3 to repeat the third command on the list, or !! to repeat the most recent command.

    But if we wanted to have a shell war, maybe I am just being pedantic and interfering.

  41. should make a poll out of this by zatz · · Score: 4, Informative

    I would vote for zsh, personally.

    I've actually had bash segfault on me a few times, which zsh has never done. and zsh uses less memory unless you do abusive things via scripting or the command line editor. zsh scripting is a superset of sh, so the things I try generally work; csh users can have a similar experience after setting a few options. (But remember, csh programming Considered Harmful.) I've become accustomed to spiffy zsh features like reporting when other users log in and out (before the prompt, just like new mail), extended globbing, very customizable completion behavior, being able to tab-expand history references (makes trying "!rm" much less dangerous), and so forth.

    It's even the little things. Like, zsh expands commands when it prints a job completion report, but bash doesn't; so if you have a loop which does something on a bunch of items, each of which can complete in the background, under bash you get a report where each item looks like "[%] Done wget $i" or something equally useless, but under zsh you can see the actual text of the command that finished.

    I have 100+ lines invested in the four rc files for zsh by now, so something new might not be immediately superior for me. I have been meaning to seriously try out es and rc for years.

    --

    Java: the COBOL of the new millenium.
  42. zsh is the supreme power user's shell by mbogosian · · Score: 4, Interesting

    csh/tcsh...

    I'm really disappointed that this is the default shell in OS X. Using tcsh is downright painful for anyone used to real tab-completion (e.g., zsh, bash).

    zsh - From what I've read, a good shell, but very nonstandard. Do you really want to lug a shell around and install it (and set up /etc/shells or whatever each time, etc.) for every machine you log into? ...

    bash - I think bash is a little better than ksh...


    If you're a bash user for the interactive benefits (i.e., tab completion, etc.), then you should really consider converting to zsh. It will take you a day, but you'll be glad you spent the time and you'll never go back (unless you're forced to, in which case it will be painful).

    Aside from the "embrace and extend" approach of these shells that a previous poster mentioned, zsh wins by a light year compared to anything else, especially with its tab completion libraries (imagine being able to hit TAB after typing cvs to get a list of the subcommands). Not only that, but zsh history/command-line editing are far superior (with a true emacs-style kill ring and real multi-line command editing). The learning curve can be steep, but there are plenty of tutorials out there to get you started. zsh is the power user's shell of choice if you spend any time in the shell (this is coming from a six-year bash zealot).

    1. Re:zsh is the supreme power user's shell by Michael+Wardle · · Score: 1

      I'm really disappointed that this is the default shell in OS X. Using tcsh is downright painful for anyone used to real tab-completion (e.g., zsh, bash).

      Neither tcsh nor bash offer anything other than basic tab completion in a default installation. Have a look at my ~/.complete for some ideas. You can integrate these completion commands in your ~/.cshrc or source ~/.complete from your ~/.cshrc.

      zsh wins by a light year compared to anything else, especially with its tab completion libraries (imagine being able to hit TAB after typing cvs to get a list of the subcommands)

      If you think zsh is the only shell that can do this, you need to get out more. I was able to easily get such functionality in tcsh using the following command:

      complete cvs 'p/1/(checkout co update add remove commit ci)/'

      I don't have anything in particular against bash or zsh, but I think you'll find that on further investigation bash, tcsh, and zsh all have many useful features in common. For some more inspiration, have a look at my shell configuration files and dotfiles.com.

  43. tcsh all the way baby by __aafkqj3628 · · Score: 1

    All I've ever used on a machine is tcsh and I simly think it's the best no matter what anybody says.

  44. eshell actually *is* a useful choice by LeninZhiv · · Score: 3, Informative

    Of course I realise you're joking, but Emacs actually does come with a built-in shell, eshell.

    What rocks about it is that it's written in Emacs lisp, so you can use it on anything Emacs runs on. It's very nice to be able to fire up a Unix-like shell on Windows for those of use who prefer a cli approach and have never adapted to the MS-DOS tradition.

    Still though, when I am in a Unix environment I like zsh for my login shell, which still has a more features.

    1. Re:eshell actually *is* a useful choice by Anonymous Coward · · Score: 0

      wow. Running emacs on windows just to get a shell?

      There are ports of tcsh, ash, and zsh as standalone win32 console programs. There are also tons of ports of the /bin and /usr/(s)bin tools. check unxutils.sourceforge.net.

  45. I agree with this, BUT: by LeninZhiv · · Score: 1

    I'm also a zsh fan and highly recommend it; but think it's relevant to this discussion to point out that people should be very cautious about tinkering with root's login shell:

    A lot of shells are not useable in single-user mode. This means that if you change root's shell, you risk getting yourself an unusable system if a later problem forces you to boot in single user mode. (To check if this is the case on your system, boot into single-user and try to start the shell at the first prompt you get.)

    So my advice is zsh for user logins, and leave root at whatever your system's default is.

  46. hugging zsh by epine · · Score: 2, Insightful


    If you try zsh and you don't think it is worth the bother to lug zsh around, you didn't have much need for zsh in the first place.

    I lug zsh everywhere. Do I really want to? Absolutely.

  47. Bash: Not only a shell but a great language by klupo · · Score: 1

    I've been using and programming in Bash for years and yes some of the features like history and tab completion are cool but the real power is in the scripting. I use bash scripts everywhere: backups,parsing files, logging greps to e-mail and in conjunction with numerous other languages that need access to the "system". the true power is in the language that comes with the shell.

    --K

    --
    "Talent does what it can; genius does what it must."
    1. Re:Bash: Not only a shell but a great language by Anonymous Coward · · Score: 0

      I totally agree. The scripting language is consistent, predictable and well designed. One can script every routine work in a few minutes

  48. Bash, until something better comes along by jgardn · · Score: 1

    I would have to agree with several previous posters, that Bash is the best. The reason why? It is powerful, it is popular, and it is easily scriptable.

    ksh and zsh have their followers, but they tend to be older unix wizards who didn't ahve bash to cut their teeth on. They only keep using zsh and ksh because it is comfortable.

    In the future, I am sure there will be more innovation done on Bash, and perhaps a few forks as well. I hope that the shell paradigm will be rethought from the beginning to the end. I don't have a solution, but I have a gut instinct that there is something better out there.

    --
    The radical sect of Islam would either see you dead or "reverted" to Islam.
    1. Re:Bash, until something better comes along by sir99 · · Score: 1

      I think you're confusing Zsh with Csh. Bash was around before Zsh. Generally, Zsh can do everything Bash can, and then some.

      --
      The ocean parts and the meteors come down
      Laid out in amber, baby.
    2. Re:Bash, until something better comes along by cant_get_a_good_nick · · Score: 1

      It is powerful, it is popular, and it is easily scriptable.
      All shells are scriptable. ksh, bash, and zsh have very similar scripting languages since they're all descended from Bourne shell. ash is just a Bourne clone. First there was bourne shell, then csh, then ksh. bash copied from Bourne and csh. zsh copied from Bourne, Korn, bash and csh. By your logic, zsh should win because it's the most powerful, taking syntax from all shells. To be honest, I use bash, but it's because of availability and command line interaction, not because of scripting power, which is pretty equal between bash and ksh. Never tried zsh, maybe I should. There's also rc from Plan 9, but I don't know how much of it's coolness comes from Plan 9 and therefore will be missing from it on UNIX.

      As far as dismissing ksh, also remember the difference between ksh88 and ksh93, ksh93 has a lot of interesting new features. It's also pseudo freeware, I forgot what the license terms are.

      only keep using zsh and ksh because it is comfortable
      They (we) also use it because ksh is part of the SVR4 standard and bash is essentially on all freeNIX machines. A shell available on the machine you're on is better than any other shell in the world that's not there. For this same reason, I know a few vi commands even though I detest vi (and emacs). You have to use what's available. I can't go onsite and throw up my hands and say "sorry, I can't do any work here, you don't have zsh 4.0 nor xemacs 21, I'm lost".

  49. My opinion, for what it's worth... by paploo · · Score: 1

    I use tcsh for my day in/ day out usage. Bash was actually my first shell, but I didn't use it much (I used it to work with my web/ftp accounts on a remote server at the time). Since then, I have done a lot of stuff in tcsh, and have configured a lot of it to what I want to do. For normal interactive useage, it has been good to me.

    However, I couldn't really recommend that you make shell scripts in it. I usually make my shell scripts for straight up sh (when I do make them), but more often than not, I use Perl or Ruby to get scripting jobs done.

    However, I since I have not extensively used bash, I really can't tell anyone what I think about it (for comparisons). tcsh has always been good enough for me, and so I haven't bothered to configure bash on my system, but I'm sure if I took the time, I would consider it a good shell.

  50. Re:Huh? - huh by DrSkwid · · Score: 1

    It's not really sensible to write shell scripts using one shell and use another, so steer clear of csh.



    poppycock

    I use csh all day long for my interactive sessions but use rc for my shell programming.

    So pray, what's wrong with doing that?

    I get the features I want from a CLI and I get the features I want from the shell programming language for scripts.

    --
    There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
  51. tcsh by i0wnzj005uck4 · · Score: 1

    I don't mind telling you that I use Bash under linux, but before I found out about fink on mac os x I used the default tcsh, and hey -- it's great. It's actually become my preference. This may sound strange, but little things like the way it handles environment variables is what cinched it for me.

    --
    - Cloud
  52. UNIX shell FAQ by scubacuda · · Score: 5, Informative

    While surfing the web for FAQs on UNIX shells, I came across this popular FAQ on the differences between shells and how to choose.

    There's a great table in there that lists the features of each.

  53. The Thompson shell by geoswan · · Score: 1

    I made a couple of mistakes. I called him Rob Mashey. Actually, it is John R. Mashey. And he felt the PWB shell he worked on was still a Thompson shell. I found a reference where he graciously said he was the third of three people to work on what he disliked hearing called "the Mashey shell".

  54. Nope, bash has that too. by devphil · · Score: 3, Informative


    Programmable completion has been in bash for a while now. See the original project page for more, or use the debian bash package, which includes the completion libraries by default.

    I actually had to disable the cvs-subcommand-autocomplete. I would try to complete the name of an actual file, and the cvs-completion would fire... generating network traffic to the CVS server... taking forever... when all I wanted was a local filename.

    --
    You cannot apply a technological solution to a sociological problem. (Edwards' Law)
  55. Csh programming NO LONGER harmful by bluestar · · Score: 2, Interesting

    Yeah, I read the article. It's from 1996 people. 6.5 years ago. Move on.

    Besides the article is horribly written. It takes him three pages to say "redirecting file descriptors is inferior to sh". Another page to say "quoting sucks". The rest is either petty or doesn't exist in tcsh.

    And he can't decide if he doesn't like csh as a login shell or as a scripting language or both.

    I admit to writing scripts in csh instead of bash. In reality both suck. If I need something so complex I need functions I am NOT using bash or csh.

    Bash and csh as programming languages suck when compared to C, C++, Java, Perl, Python and LISP. But I'm not about to make emacs my login shell (again).

    My login shell is tcsh. There are things I hate about bash/readline. YMMV. Use the right tool for the job. Not available in Tennessee.

    --
    "The cost of freedom is eternal vigilance." -Thomas Jefferson
  56. Depends ... by nbvb · · Score: 2, Informative
    When I'm myself, my shell is set to /bin/bash.

    When I'm the root user, my shell is /sbin/sh (No, *NOT* /bin/sh!) On Solaris, one should *NEVER* change root's shell.

    Ever. Ever. EVER. Instead, in root's .profile, I have the following:
    if [ -x /usr/bin/bash ]; then
    exec /usr/bin/bash
    fi
    This _will_ cause problems using dtlogin, but real admins use serial consoles!

    All my scripting is done using /bin/sh .... I know it's standard, I know it's on ALL my Solaris machines (The 2.5.1/2.6 ones don't have bash by default ... thank GOODNESS we're retiring most of them :)

    For simple sysadmin-type tasks, the bourne shell has almost all the features you need ... but if you need to do hairy things with I/O, then it's nuttin' but Perl.... Remind me to share my Veritas Volume Mangler scripts some day :)

    --NBVB
  57. BusyBox by e8johan · · Score: 2, Informative

    If you want a small memory footprint, try the embeddable shell alternative: BusyBox.

    "BusyBox has been written with size-optimization and limited resources in mind. It is also extremely modular so you can easily include or exclude commands (or features) at compile time. This makes it easy to customize your embedded systems. To create a working system, just add /dev, /etc, and a kernel."

    1. Re:BusyBox by Anonymous Coward · · Score: 0

      Correct me if I'm wrong but I thought that BusyBox does not include a "sh" command...

    2. Re:BusyBox by Anonymous Coward · · Score: 0

      Heh, nevermind, I'm an idiot. I just went to the web site (as I should have done before I posted), and sure enough, BusyBox has a "sh" function. Nothing to see here, move along...

  58. why I use csh instead of sh... by Jamie+Zawinski · · Score: 3, Interesting

    I never write scripts in csh (I use perl or sh) but I still use csh as my interactive shell, because (aside from trivially launching programs) the most common thing I use any of the actual syntax of the shell for is pounding out stuff like:

    • foreach f ( *.jpg )
      djpeg $f | pnmscale ... | cjpeg > $f:r-thumb.jpg
      end

    sh/bash don't support the $var:r and related syntaxes, and so it's a lot more typing to do:

    • for f in *.jpg ; do
      djpeg $f | pnmscale ... | cjpeg > \
      `echo $f | sed 's/\..*/-thumb.jpg/'`
      end

    1. Re:why I use csh instead of sh... by kiatoa · · Score: 1

      Does zsh support the $f:r syntax? I'm not sure what to look for but it sure looks useful. BTW someone above didn't like the multiple zsh man pages. If you look a little closer you might notice that zshall gives all the man pages in one massive page - at least on my debian system.

      --
      90% of the wealth is in 2% of the pockets. Bummer to be in the majority.
    2. Re:why I use csh instead of sh... by ebh · · Score: 1
      for f in *.jpg; do
      djpeg $f | pnmscale ... | cjpeg >${f%.jpg}-thumb.jpg
      done
    3. Re:why I use csh instead of sh... by Anonymous Coward · · Score: 0

      I agree the csh suffix-substitution syntax is a concise expression for an oft-used operation.
      But there are lots of good tricks in bash too. In this case there's no need for `echo | sed` .

      [bash]

      f="abc.jpg"
      echo ${f/./-thumb.}

      ==> abc-thumb.jpg

      Same number of keystrokes. Arguably more conceptually elegant.
      You would need to do a little more work both in bash and in sed (in csh too?)
      if there's more than one . in the original filename.

  59. I wrote my own... by gatkinso · · Score: 1

    I call it gsh (Geoffrey Shell). This was an assignment I had in grad school that somehow never ended.

    It isn't very full featured, and as far as a scripting shell goes it is somewhat buggy - but if I need some programming done I use C or Perl.

    However it does the stuff I want it to do!

    I could GPL and release the source, but in all honesty everyone I have gotten to try it hates it. I like it tho. And if it pissed me off I have no one to complain to but me.

    All you out there who like to complain about shells other people write: get off your rear and write your own.

    So there.

    --
    I am very small, utmostly microscopic.
  60. Screw backward compatibility by GnoMoreGnuPuns · · Score: 1

    Really, the backward compatibility argument will keep you backwards forever. Zsh is by far the most advanced shell; unless you're constantly logging into several machines daily it is easily the best choice. Not to mention, the more you use it, the more popular, and thus ubiquitous, it becomes.

  61. Memory usage? what about ash? by DeKoNiNG · · Score: 2, Insightful

    It is the default shell for many Linux floppy distributions. It does NOT have command line completion, but when it comes to memory usage, you should really look at it.

    --
    Troll: Large Giant, 63 hp, AC 16, Usually chaotic evil.
  62. bashed by bash by Anonymous Coward · · Score: 0

    Funny, I've run bash for a while because I didn't need anything more (depsite using fancier shells at an earlier age) and was just this week about to switch off of bash after running the following command in my ~/misc directory:

    chmod g+w *
    chmod g+w .*

    After I ran that, I couldn't log into the machine. After much agony and troubleshooting in the dark, I later realized that bash was expanding .* to include .. and was changing the permissions on my home directory, thus triggering ssh's security paranoia. I wonder if the same sort of thing happens to other people? Gee thanks, bash!

    1. Re:bashed by bash by Anonymous Coward · · Score: 0

      Dude that is how how it works, and it works that way with all of the shells that I have used. what the fuck did you think that .* was going to expand to? If I type file* should it not include file.?

  63. How to Try or Switch to Zsh by frosencrantz · · Score: 1

    There may not be a fancy set of commercials saying why folks switched to zsh. There are some resources for the bash or tcsh user who wants to convert to or try out zsh. These can found here This page includes links to some how-to type information, and some tools/scripts that convert/adapt completion functions.

  64. My favorite shell. by t-maxx+cowboy · · Score: 1

    I am not sure if I have a favorite *nix shell.

    But it does lead you to wonder why no one has made a turtle shell. Or being risky in these times why not a bomb shell.

    The nameing of shell environments in *nix seems to stray away from any 'real shell' naming.

    --
    Regards,

    Ryan Pritchard
    Fun Extends All Basic Life Expectancies
  65. DOSSHELL !!! by sQu@sH · · Score: 1

    C:\>dosshell

    OH YEAH!!!!

  66. rc by Indigo · · Score: 1

    I use the rc shell, originally from the Plan 9 operating system, for my personal systems. The minimalist philosophy and syntax makes scripting simple (modulo some awkward syntax for if/else logic), and the nestable backquoting syntax combined with GNU readline (optional) makes it simple to iteratively hack up nested 3-level-deep pipelines on the fly. One minor drawback for interactive use is that working with file or directory names containing spaces is not that smooth.

    When on other people's Unix systems, whether for interactive work or scripting, bash is the shell of choice. It's almost always there (and if it isn't, it's easy to build a local copy, it runs on virtually any system). The filename completion is fantastic, and compatibility with vanilla sh makes scripts portable (just avoid the bash specific features).

    For Windows, I use Cygwin+bash. That combination turns my Win2k PC at work into something usable.

  67. Using zsh from cygwin by frosencrantz · · Score: 1

    One complaint people have about zsh is that it is not as readily available as other shells. Zsh is readily available with Cygwin. And there is a command "mkzsh" that will create a shortcut icon like the one for bash.

    Note: You may need to edit /zsh.bat if the shortcut created doesn't work properly.