According to MacNN, sources are reporting that the latest developer release of Mac OS X “Panther” has changed its default shell from tcsh to bash. From ISPs using both OSX and Linux, it’s kind of good news. It seem that Linux’s popularity gives some kind of “prefered shell” status to bash.
Yick.
Yaay!
whatever
Yum?
Perhaps it’s not as bad as I personally think it will be. I suppose I’ve just grown used to tcsh in the years I’ve been away from Linux.
Go, Darwin!!!
Yup!
How about a native ksh. I’ve installed pdksh just because I feel more at home using it, but it would be nice if Apple included it as a shell option in 10.3.
Recent benchmarks show that tsch is vastly superior and faster to bash. What is Apple thinking? Apple is afraid to put out a good shell of its own. So dumb.
Excellent!
I love BASH
Being a BeOS/Zeta script kiddie (and C/++ coder) I will be able to create more and more scripts / proggies for Macs.
Anyway, back to my destroyed life, and debt
Has anyone here bothered to mention that compared to Bourne syntax, C shell syntax is horrid? That’s not to mention the ‘rehash’ nastiness in C shells.
Yes, Bill Joy, my idol, might have created C shell… and C shell may be what I use on virtually every system, but from an enduser perspective bash is certainly the way to go.
see topic
Faster, less resources, etc, etc.
I wonder just how long it’ll be until they randomly decide to rip out everything BSD and replace it with GNU. Sure, it may sound like mad ranting now (admittedly, it mostly is), but hey, who’d have thought that they’d replace tcsh with bash?
GNU tools and libs are clunky and bloated (IMO). The one thing I had always liked about the new Mac OS is that it is based heavilly on BSD.
http://docs.rinet.ru:8080/UNIXs/ch13.htm
Prog.
>>GNU tools and libs are clunky and bloated
BSD tools are less functional than GNU tools IMO.
Oh yes!
“BSD tools are less functional than GNU tools IMO.”
That may be, but I,ve found the features of both to be comparable. BSD just does more with less.
On further inspection, it appears that FreeBSD at least does more with GNU/less
I wonder just how long it’ll be until they randomly decide to rip out everything BSD and replace it with GNU. Sure, it may sound like mad ranting now (admittedly, it mostly is), but hey, who’d have thought that they’d replace tcsh with bash?
Because bash has more features, maybe? Because most users of a unix-like os nowadays are more used to a bourne-like shell? tcsh always feels uncomfortable to me, because I don’t have a lot of time on systems that use a c-style shell by default. And whenever I get on one of those, I’m often frustrated by it, and end up doing chsh.
GNU tools and libs are clunky and bloated (IMO). The one thing I had always liked about the new Mac OS is that it is based heavilly on BSD.
Bzzzt. WRONG. OSX is based on the FreeBSD user space, but the internals are *nothing* like FreeBSD — which is a *good* thing for a desktop OS. Old crufty Unix sucks in many respects, especially on the desktop. And even if you want to make the argument that it’s FreeBSD-based — what’s the default shell for FreeBSD? Oh, my bad, /bin/sh. Same with NetBSD, which was what the Unix subsystem was originally based on (NeXt/OpenStep, and OSX 10.0). Tcsh was a weird choice to begin with.
Okay. To be clear, I am well aware of Mac OS X’s architecture. Based on Nextstep. FreeBSD usespace, yes. Some utils from the other BSDs. Fact remains, there is a BSD based “layer” “on top” of the Mack kernel (which is not being used as a microkernel I might add, as the BSD subsystem makes direct calls to the Mach kernel, as opposed to communicating via messages.
“Because bash has more features, maybe?”
They both have some features that the other lacks, but tcsh is smaller and faster. The fact that scripting with it sucking is irrellevant, as most scripts call the shell they require to execute anyway. Funny that.
“Because most users of a unix-like os nowadays are more used to a bourne-like shell?”
Define most. Back it up.
“tcsh always feels uncomfortable to me, because I don’t have a lot of time on systems that use a c-style shell by default. And whenever I get on one of those, I’m often frustrated by it, and end up doing chsh.”
Heh. I do the same thing when comfronted with Bash
There are likely many like me.
“OSX is based on the FreeBSD user space, but the internals are *nothing* like FreeBSD — which is a *good* thing for a desktop OS”
Difference of opinion. Both use monolithic kernels, and both can swap out the GUI components if required. Quartz Extreme is snazzy, no doubt, but it will not be a unique entity forever.
“And even if you want to make the argument that it’s FreeBSD-based — what’s the default shell for FreeBSD?”
tsch for the root user, sh for others. You only give half of the picture. And note that users get “sh” and not “bash”.
“Same with NetBSD, which was what the Unix subsystem was originally based on (NeXt/OpenStep, and OSX 10.0).”
There is still NetBSD in there. Apple took code from all three Open Source BSD projects for both the kernel, and the userland. FreeBSD is their reference platform however, and most new code comes from them.
Anything I missed?
Mach. It’s too early in the morning here.
My spelling sucks
We at Microsoft have copyrighted the phrase “With Windows Server 2003, you can do more, with less”.
The phrase you have just mentioned “BSD just does more with less.” shall never be used as a marketing material, or you would be infringing on our Intellectual Property.
Please keep this in mind.
Thank you,
Microsoft Legal Team
Michael_Frits@microsoft.com
Hahah! I needed a good laugh. Thanks!
well, from what I understand, bash is mostly a superset of sh, and ksh (http://docs.rinet.ru:8080/UNIXs/ch13.htm ). Bash is the most feature-full shell out there except zsh. Any user of bourne shell would be more comfortable with bash than tcsh or csh. It seems that bash is a step up, and the only further step could be zsh, but that’s even more bloated and much larger.
My experience with bash has been the best so far, every time I use tcsh(which I learned first) it seems to be “missing” small things that I use.
The will most likely leave tcsh in there, so if you dont’ like it, you can easily change. Bash however adds better compatibility with almost every linux system out there.
“The will most likely leave tcsh in there, so if you dont’ like it, you can easily change.”
Both are in there now, from what I remember. It’s only the default that has changed. You’ll find arguments on both side of this issue. None really matter though, as Apple will do as it will regardless, and you can still change the shell…
Shouldn’t you always place #!/bin/sh at the beginning of your shell scripts? Shouldn’t the default shell have no or little influence on compatibility? Doesn’t tcsh also do completion (hint: Control-D)? Didn’t tcsh also have libreadline-like history editing? Isn’t tcsh smaller and less bloadted than bash? Isn’t tcsh just as much better as csh than bash is better than sh? Don’t users hate it when things change? Isn’t there chsh for those who really want bash? Shouldn’t Apple stick thus remain having tcsh as default?
In case you didn’t notice: all answers are YES.
sweet
if both shells are installed and available by default, it shouldn’t matter that much … I personally use FreeBSD with BASH, just because I also use BeOS (and sometimes linux), and since BeOS never really had a good shell besides bash, it was the only “universal” shell …
but really it doesn’t matter, many shells, many choices, and no matter which shell they use, using them in sh mode, they all act the same for the scripts …
bash is already around in Jaguar.
Go to you terminal (tcsh) and type ‘bash’ – voila there is the bash shell.
The issue is only about the default-shell apple select in Panther.
So what is the deal here?
If they changed it, it’s safe to say that there was allot of demand for it. I kind of prefer the better completion and spellchecking features of tcsh, but hate the stderr and stdout handling.
Other than that, people who upgrade from Jaguar to Panther, will keep the shell they are used to. People who switch from linux, or people who pick up a unix for beginners book, will find themselves in a familiar bash environment.
If you don’t like it: sudo nicl . -create /users/<login> shell /bin/tcsh
I don’t care as I very rarely have to use the shell. If you use the shell a lot you would probably be happier with a Linux or BSD. They come with far more command line programs.
More command line programs, don’t mean more productivity. Just like more features in a program, doesn’t make it automatically better.
Anyway, I used Linux/Freebsd for a couple of years, I can honestly say that mac os x gives you an equally enjoyable shell environment.
BSD tools are less functional than GNU tools IMO.
Yes, GNU adds “function” by adding proprietary extensions to existing applications. Consequently applications quickly become bound to the GNU toolchain. What is worse is when build systems make horrid, rash assumptions about the underlying system, like assuming that /bin/sh is bash or that lex is flex.
Repeat after me, “I can use whatever shell I like” Now do it!
i like bash, but its resource intensive.
zsh + ksh are nice. never did like tcsh much…
I’ve read a bunch of posts about how much more resources bash uses.
Huh?
If you wanted small and fast, just install netbsd and have all the tcsh-by-default goodness you can handle
I never would have expected so much love for tcsh from Mac OS X users.
It amuses me to see this many people happy about an OS X feature that I only vaguely understand and will probably use next time it’s Dec. 32.
Well, actually, it illustrates what makes OS X such a wicked keen *nix. All that stuff is there for the people who want to use it or need to use it. And it’s tucked neatly out of the way for those of us who don’t need or want it won’t keep tripping over it on the way to getting other cool things done.
Why don’t they just use Xcode for a shell?
From:
http://www.apple.com/macosx/panther/xcode.html
“Xcode is designed specifically to keep you waiting less and coding more. Apple’s ground-breaking new approach to developer productivity streamlines all your most common and time-consuming tasks by fusing familiar user interface concepts with a unique mix of performance technologies in a complete integrated development environment.”
Erm, just *how* is this a good shell replacement?
Actually, bash uses slightly less memory than tcsh on MacOS X and signficantly less allocated. Bash uses 704K/1828K while tcsh uses 788K/5872K (RSS/VSZ) on MacOS X 10.2.6.
USER PID %CPU %MEM VSZ RSS COMMAND
jordy 14649 0.0 0.1 1828 704 -bash (bash)
jordy 14658 0.0 0.1 5872 788 -csh (tcsh)
Just something to think about given all the comments about bash being more resource intensive.
Whats with all these wacky comments about shell overhead and performance? On modern multi-ghz machines is it even noticable? Yeah, on a 386 33mhz maybe a “bloated” bash would be slower then tcsh, but god on even a 7 year old Pentium I have extreme doubts anyone would notice.
For what its worth I prefer bash, but only because my first Unix experience was with Linux.
“Memory usage of bash vs tcsh on MacOS X”
Before that can be taken as a meaningful result, I would need to know which shell you were in when you got that result. I am assuming that the currently running shell would use more resourses than one sitting in the background doing little or nothing.
As soon as I can get to a Mac based machine, I will test this myself, but until then I would think that more information should be given to back up your results.
I opened up Terminal and closed the window it opens by default. Then went File/New Command and typed in /bin/bash and repeated with /bin/tcsh. In each open window I ran ps auxww |grep (shell).
In my machine neither bash nor tcsh was running more than once (Terminal was the only thing using it).
Ummm, guys….you’ve been able to set your default shell in Mac OS X’s Terminal app for a while now. If you prefer tcsh, set it as the default. Is this really that hard?
Definately something that i will look into. I am curious. On my native FreeBSD (last time I checked), tcsh is a statically linked executable, and bash is dynamically linked. Bash was larger than tcsh. This alone would indicate that bash would require more memory.
I admit, I am currently unfamilliar with these details on Mac OS X. Something I will look into. To be clear, I am not accusing you of lying. I just need to do things like this myself (under more controled conditions) before I can fully trust in any such results.
Thank you for providing the more detailed information though.
“Ummm, guys….you’ve been able to set your default shell in Mac OS X’s Terminal app for a while now. If you prefer tcsh, set it as the default.”
From what I’ve read so far, I believe that everyone here knows this fact. This (for the most part
isn’t an issue of a shells availability in Mac OS X.whatever, but rather a friendly discussion on which should be the default one (for whatever the reason). Most people’s reasons (including many of my own) are based largely on personal preference due to our experiences with various shells. Some more painful than others.
If you wanted small and fast, just install netbsd and have all the tcsh-by-default goodness you can handle
NetBSD doesn’t even come with tcsh. Plain NetBSD installation has only sh, ksh and csh. Default shell for root is csh.
Yick. That’s worse than bash
DOS Shell – any time!
Can someone explain to me shell performance? Theres been comments about how slow bash is – er, okay. I can’t fathom that unless your running Minix on a 286, all hardware I’ve ever run be it my 33 mhz Sparc or my dual Athlon runs any shell equally fast in my eyes. Their freaking shells, not Gnome – I type in something, hit enter – and instant feedback most of the time, depending on what I typed. Would performance be with scripting? *shrugs* I can’t figure it out, someone mentioned RAM usage – again, er – how resource strapped are you? Bash migbt be bigger then whatever else – but do you only have 4 megs of RAM? Less? Its not like bash uses 32 megs of RAM or more, christ.
How many shells or scripts are you running? When doing *real* work, rarely does one have the pleasure of only running one of something… multiple windows, multiple shells. Same idea. One thing you should learn, is that you can *never* have enough RAM. Always something eating it up.
I like bash best, but on the other hand, I havent used anything else!
Define real work. I don’t do much scripting, frankly I hadn’t learned enough of it, but I’d like to think I do a bit of “real” work. I do quite alot of compiling among other things, multiple terminals, etc. What do you consider real work in which the minute size of a shell could come into play? Hosting free shell accounts on the web, in which potentially hundreds of users remote in? That I could see as something that would scale up and potentially strain a shell.
An OS that used to require a bare minimum of 256MB RAM not to stutter while drawing window minimization animations, and people are whinging about the memory use of a shell? Jebus.
bash rocks. tcsh stinks.
In the early days of linux, before people fully realized it was going to really take off, bash was there, and there was some speculation that tcsh might never be ported.
Please check out this http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/ informative article about why you shouldn’t program in csh.
The reason why Apple is “switching” is simple it makes it easier to port Linux shell scripts to OSX. Thats it and nothing to do with the relative merits of BASH and tcsh.
That’s ‘csh’.. not ‘Tcsh’.. but still, when you write shell scripts – you should only use ‘sh’.. not bash/csh/ksh/tcsh/zsh/etc.
“Define real work.”
I am sure you are aware of what I mean by “real work” as you claim that you “think I do a bit of ‘real’ work”. But my definition of “real work” in this case includes situations where a computer is not sitting idle as it is always doing something, and as I commented when responding to you earlier, often this means running multiple instances of things, like the shells.
“I don’t do much scripting, frankly I hadn’t learned enough of it.”
OT: you should learn. Computers were not meant to sit idle.
“What do you consider real work in which the minute size of a shell could come into play?”
Anything biological. As a biology student, I tend to run quite a few rather resource intensive apps, often in a number of shells. The apps I run obviously require more resources than a simple shell, but as smaller shells take up less resources than larger ones, I can devote more of my computer’s power to doing actual work searching genetic databases, instead of feeding a familly of bloated, hungry copies of bash.
Does it make any real world difference? Hard to say without doing any thorough benchmarks, but the logic seems sound (smaller shells using fewer resources), even if it is only a minor gain.
You don’t need bash to be the _default_ shell to help porting bash script on OSX, that’s plain silly.
“The reason why Apple is “switching” is simple it makes it easier to port Linux shell scripts to OSX. Thats it and nothing to do with the relative merits of BASH and tcsh.”
I’m sorry to break it to you, but that is a really dumb (as in uninformed) statement. Have you ever written a script? Have you ever even *looked* at a shell script?
The very top line of the script will have a line simillar to the following:
#!/bin/sh
This tells the shell you called the script from which shell is required to execute the shell script. As Mac OS X already includes both tcsh and bash (and many others) this isn’t a problem now, much less an issue to be solved by making bash the default shell.
You argument is absolutely invalid.
In the past, csh and tcsh had problems manipulating large (>2GB) files. For example, built-in commands like cp, mv, cat, >, >>, ls, and so on would not work correctly. On the same machine, you could start up sh, bash, or similar shells and the operation would work correctly. I remember this occurred on aix and linux machines, I don’t think I ever tried it on earlier versions of MacOSX, but I just checked 10.2.6 and tcsh works fine.
% ls -l
total 8388616
-rw-r–r– 1 xxx staff 4294967305 Aug 27 17:18 file1
% echo “new text” >> file1
% ls -l
total 8388616
-rw-r–r– 1 xxx staff 4294967314 Aug 27 17:21 file1