Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
ash is lightweight bash and is often used to run startup scripts (faster than bash).
Yep, sh is often a symbolic link that exists mainly to ensure compatibility with scripts that require the original bourne shell.
When sh is a symlink to bash, bash actually behaves differently such that it emulates sh better:
Quote:
Originally Posted by http://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html
If Bash is invoked with the name sh, it tries to mimic the startup behavior of historical versions of sh as closely as possible, while conforming to the POSIX standard as well.
I used ls -l /bin/sh:
Using Ubuntu it's a link to dash, using Slackware it's a link to bash.
ash is the almquist shell and dash is the debian almquist shell.
A new shiny, up-to-date, super-shell for Linux 2010?
No offense intended, but it won't be any variant of Bash, will it?
I mean, no disrespect to that lovable old clunker, but it's well past its sell-by date. Oh, I know it does what it should, but it's so AGED and counter-intuitive!
The distros (in the main) have improved *astonishingly* well. But the shells generally haven't (possible exception for the zsh but even that could do with some work).
Here's a proposal (again, with no offense intended towards good 'ol Bash) but, can't we have a brand new, shiny, teflon-coated, user-friendly shell befitting of Linux for the 21st Century? Something that's more intuitive to use? Something that supports a whole bunch of the best scripting languages, plus C/C++ (whatever else you got) as well?
C'mon, guys. An army of non-nerds awaits to dump Windows for the supremely better alternative that Linux offers! Let's give 'em the FULL experience, huh? Do it! Do it to kick Bill Gates in the teeth!
Voice from off in the corner, hands cupped around mouth for loudspeaker effect:
"This thread provided for those who may have missed the flame wars of the old Usenet days. Certain elements have been intellectuallized for the benefit of those who may be prone to violent flashbacks."
That, my friend, is called 'feature creep'. Clearly, you have not heard of the Unix philosophy of 'Do one thing and do it well'. The job of a shell is to provide an interactive environment from which you can run programs and otherwise interface with your computer, and to be an interpreter for the language you do that in (sh-compatible shell scripting, with a few improvements over the years). Other scripting languages are supported by the shebang, which not only solves the problem of the interpreter having to guess what language you want it to interpret you as but also means that your current, 'clunky' shell can support an unlimited number of other languages, just so long as you know where the proper interpreter is on your system. bash's job is not to be perl; that's perl's job.
As for your other improvements, I find the Unix shell environment plenty easy to work with. Do you really want more intuitive, or do you want more like what you used before you started using Linux? Also... how exactly would an interpreter make use of C/C++? Could all your frustration be released with a simple `chsh -s /bin/tcsh`?
The key points having been made, the aging thread begins to accumulate more and more strange and bizarre comments.....The race is on to see who can have the last word before someone closes it.......
I'm keeping a list of things I want fixed or improved in the Linux distro of the future. There are so far 438 items on the list, and a better BASH is not one of them. Almost every day, one of my computers does something to annoy me, but BASH is never part of the problem---rather it is often part of the **solution**. I sincerely hope that none of the mainstream distro maintainers does **anything** with BASH except to put the most recent version in the repositories.
The key points having been made, the aging thread begins to accumulate more and more strange and bizarre comments.....The race is on to see who can have the last word before someone closes it.......
Why would anyone want to close it? You're not anti-free speech are you? Then perhaps you're anti-progress?
Quote:
I'm keeping a list of things I want fixed or improved in the Linux distro of the future. There are so far 438 items on the list, and a better BASH is not one of them. Almost every day, one of my computers does something to annoy me, but BASH is never part of the problem---rather it is often part of the **solution**.
It might well be for those like yourself that have been clunking around with it for the best part of 40 years, but if you ever hope to draw more people away from Windows, then the drastic re-invigoration of the command shell is an absolute MUST.
no you miss the point.
it's part of a toolbox.
no language does it all,
you pick the best tool for the job.
unix is a box of many many tools
all very very sharp.
ok an example...
find the ten most common words in Don Quixote by Cervantes
(I use ksh but you get the point)
Code:
$ fmt -1 don_quixote.txt | sort | uniq -c | sort -rn | head
20795 the
16536 and
13388 to
12772 of
7134 that
6958 a
6809 in
5710 I
5634 he
5063
$
That took ten seconds to type.
Now how long would it take you to do that in C++?
But then one wouldn't do a 3D graphics chess program in shell.
you choose the best tool for the job, there is no overarching master programming language.
oops, no blank lines wanted, will i have to recompile?
Code:
$ fmt -1 don_quixote.txt|grep . | sort | uniq -c | sort -rn | head
20795 the
16536 and
13388 to
12772 of
7134 that
6958 a
6809 in
5710 I
5634 he
4512 for
btw, it's quick: 0.68s real 0.76s user 0.06s system
that's 428,905 words!
impressive?
Last edited by bigearsbilly; 08-12-2009 at 05:01 PM.
Of course I can do all that shit in korn or tcsh or zsh or whatever; but we're trying to appeal to disaffected Windows users! There's zillions of them. It's an open goal. Jeez! Make the extra effort! The Windows shell is emaciated. Even the *original* Bourne one is liberated by comparison!
Don't stand on your haunches for evermore.
Last edited by Tinkster; 08-12-2009 at 06:03 PM.
Reason: [mod_edit]lnguage cleanu-up[/mod_edit]
... if you ever hope to draw more people away from Windows, then the drastic re-invigoration of the command shell is an absolute MUST.
I still don't know what you're on about.
Unix (and the tools that come with it) have been around
for donkeys years (they predate windows by a decade),
they fulfill their purpose just fine, and many people happily
use the old clunker every day. I'm not sure where your
idea that using bash is about "converting windows users"
comes from.
I also don't think that windows equivalent "Windows scripting
host" has anything better to offer than what my tools do, it
may offer some similar functionality by different means; but
just because it's different doesn't make it better or superior.
And if I wanted to learn scripting on windwoes I'd just have
to sit down and learn. What a surprise. I can't see why it
should be different for other people, the other way around.
At the end of the day what you're saying is "make English
more like Chinese so you can convince more Chinese to
speak English" ... huh?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.