Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
So ... Linux is the true computer lovers OS. Why then is bash so primitive? If 4DOS was a Rolls Royce, bash would be a Lada, and even command.com would be a Pinto. Even command.com has smart command recall but with bash you have to cycle through everything to recall a specific command. 4dos is so elegant, so easy to use, so convenient, so powerful -- why can't we have the same, or better, in Linux? Bash looks and feels like something written in machine language in 1950 to run on ENIAC.
I know there's *power* there, but ease of use is not.
Bash commands can be input by simply typing in some of the command and then hitting tab. DOS never had that. The command line in Linux (or any *nix) blasts all of the Microsoft command line and GUIs out of the water. You can also see (IIRC) up to 150 of the last commands entered simply by hitting the up arrow key.
What are you trying to do that is getting you so frustrated?
I know there's probably more to bash than I've discovered so far, but right out of the box, what bugs me is not having (it seems) smart recall, i.e being able to type the first few letters of a previous command, at which point TAB cycles through all the commands in history that start with *that* sequence -- not through *all* the commands.
BTW, some other dudes I hang around with thought I was being rude above. I hope not! I'm just being honest about my first impressions of things. Like so much of Linux, the learning curve might be very steep but the view from the top could be marvelous.
Well that's almost good enough, thanks. But I'd still prefer to just type a few letters and press the up arrow, like in DOS.
Nevermind, getting used to something new is almost always a chore.
... and now that I try it a few more times, it's rather interesting that you can search for characters anywhere in the command string, not just at the start. I'll try to find some 'bash for DOS lovers' tutorial that will walk me through this sort of thing.
Thanks--I can't believe I've missed that well, never too late to learn something new I guess...
Quote:
Originally Posted by rayandrews
If 4DOS was a Rolls Royce, bash would be a Lada, and even command.com would be a Pinto.
I don't know Pinto, but anywhere in the real world where temperature goes well below zero degrees Celsius (and everything warmer than that), a Lada would definitely be a better choice than Rolls Royce. Here RR wouldn't probably even start, or if it did, it probably asked to be left alone.. Not so with a Lada, so I guess your statement was accurate after all
I know there's probably more to bash than I've discovered so far, but right out of the box, what bugs me is not having (it seems) smart recall, i.e being able to type the first few letters of a previous command, at which point TAB cycles through all the commands in history that start with *that* sequence -- not through *all* the commands.
The last command ("!gcc") will run the most recently executed command in the shell history that starts with "gcc" (which, in this case, would be "gcc -Wall -o run_me main.c parse.c output.c")
Distribution: RPM Distros,Mostly Mandrake Forks;Drake Tools/Utilities all the way!GO MAGEIA!!!
Posts: 986
Rep:
Back to the original topic
Bash is integrated into Linux in as far as ideaology and in the "Linux data structure". It's like a built in Interpreter to configure your O.S which does make it like windows in that way. I believe you can use something like python but it's not "ready to go" like bash is. The Bash interface I have is temperamental which makes it hard to use but after you get used to its rickety interface is astounding of the commands you can run. Use the file search commands sometime and compare it to DOS. DOS stands for (Disc operated System). Just because the screen is black with green lettering does not mean you are using DOS. I think you have to go prior to Windows ME to actually be running the same Command terminal as you did when you had to load your O.S off of a floppy disk. When a non multi- tasking O.S is run it does have to be MS DOS etc.
Thanks, '101 hacks' bookmarked. I love docs like that, they are cheat sheets for the real world problems you are likely to fall into.
I guess I'll get to love bash when I find it's power makes it's clunkyness endurable. OK it's not a Lada it's
a Union Pacific Big Boy locomotive, and about as easy to drive ;-)
But I still wish one could just type the first few letters of a previous command, press the up arrow and have that command back on the line, for editing. Rather like a combination of '!' and 'Ctrl + r', as you guys have mentioned above.
Thanks, '101 hacks' bookmarked. I love docs like that, they are cheat sheets for the real world problems you are likely to fall into.
You're welcome...
BTW, in the Control+R hack example, this is not mentioned.
The author used red as the keyword in his example. Let's say it found one instance of red. To see if there are any more instances of red, just hit Control+R again and the next instance of red will display.
You can continue this until all instances of red has exhausted.
Quote:
Originally Posted by rayandrews
But I still wish one could just type the first few letters of a previous command, press the up arrow and have that command back on the line, for editing. Rather like a combination of '!' and 'Ctrl + r', as you guys have mentioned above.
It's possible that maybe the other shells have this feature that you are seeking. The csh, tsch, ksh and zsh are all powerful shells in their own right.
Just curious, did you know when using the Control+R method, you can edit the command line by hitting the left-arrow keys before executing? if not, that is how it's done.
bash is definitely better than DOS. In fact, bash is probably more like a programming language that interprets as you type than a simple command line.
Hey, you could program in DOS too! Anyway the shell isn't "DOS", it was "command.com" and associated utilities. Though it was thousands of time more limited than bash or any other modern shell, i've seen (and sometime wrote) ridiculously complex stuff in "batch language", to give an example a fairly efficient virus that infected other batch files, or piping output to the "debug" program to assemble binaries on the fly (ok the virus could be bad morally, but technically it was kick-ass, besides never got out from my computer).
btw, ctrl-r is for searching "backward" in history, if it happens to you that you type it too fast and miss your command, ctrl-s will search "forward".
bind -p | grep history will show current key combos for history ops.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.