Bash 3.0 Released
qazwsx789 writes "The first public release of bash-3.0 is now available via ftp and from the usual GNU mirror sites. For the official release notes by the author, Chet Ramey, check his usenet post."
← Back to Stories (view on slashdot.org)
...a GTK front end
I've been waiting long for this day!
Bash was my first shell and I used it exclusively for years. One day, I'd read enough about zsh to force myself to give it a try. Oh how I loved thee, bash, but I won't be going back.
Dewey, what part of this looks like authorities should be involved?
Hell, I didn't even know bash was still in active development. It was always just bash to me, not bash-x.y.z. But then I guess I wouldn't notice the difference, really.
Switch back to Slashdot's D1 system.
What are these, I wonder? Something along the lines of changing the prompt to always display [litigious@bastards]$, perhaps?
Real Daleks don't climb stairs - they level the building.
Someone tell me why I want this. The Usenet post doesn't seem to explain what's so exciting about it, besides a bunch of boring bug-fixes, and some esoteric-sounding syntax changes.
I don't need no instructions to know how to rock!!!!
Doesn't seem to be much changed given the version number increase. [[ =~ ]] can match regexes and it can do zsh style {1..3} expansions. Improved multibyte support too. There were bigger changes in some of the 2.0x updates.
I am looking at the title going a Linux bash headline on slashdot, now i must have been dreaming. But I am sure that i would not post that here, knowing i would loose all my karma in one stroke.
It's nice to see yet more contributions from Apple to the OSS community.
Several bug fixes for POSIX compliance came in from Apple; their assistance is appreciated.
It looks like Apple is giving back to the community, and to a fundamental tool.
To the parent: I'm in the same boat. I thought bash 3?? What is there to add?? Looks like multibyte char support (sorry, I'm are a dum Amer'kin).
-truth
I had a steady B+ in my AI class until I failed the Turing test...
Why use a middleman when you have access to the source?
Meh.
Pretty much the same way here, except that I use Knoppix instead of Fedora.
I've been using Linux for years, but - being a non-developer - I'm finding less and less reason to use the commandline (unless I'm using a CLI app such as lynx, bitchx or dopewars).
They should have called the movie Bourne Again.
The Bourne Again and Again and Again Shell! Again!
I have discovered a truly marvelous
**b. System-specific changes for: SCO Unix 3.2, Tandem.**
I wonder.
if sco then blowup
world was created 5 seconds before this post as it is.
...you can go full-circle, and use Cursed GTK!
pb Reply or e-mail; don't vaguely moderate.
Yeah, Bash 3.0 is great and all, but when are the bash people going to upgrade rbash? Man, I can't do anything with that shell!
Dopewars!
The reason the CLI was invented!
I seriously hope they've fixed that bag. Since a lot of GNU/LNUX distros don't even ship with a real sh, but symlink to bash. Some random linux bozo makes a #!/bin/sh script thinking it will be portable, but bash (at least 2.x does) forgets to switch off some features when invoked as /bin/sh, so in the end you write a non-portable script. And listen, linux people, /bin/bash is not standard!
Alfred, tired of fixing stupid scripts that assume the whole world has bash in /bin.
Looks like a nice Unicode-savvy release that should help with dealing with international languages at the command line. And yay to Apple for giving back (again). When will people finally accept that Apple is indeed helping out the OSS community through GCC, bash, and other tools...?
Kind of off-topic, but for speed purposes in scripts that have to run fast, I find nothing better or more convenient than Ash, especially on systems where
Does anyone know any history on this shell? Is it a clone of the original bourne shell or of bash? I can't seem to find anything useful on Google
Hire a Linux system administrator, systems engineer,
I can't be the only one who snickers every time I see a commercial for this film. Think Geek used to have a "Bourne Again Believer" t-shirt but I think they dropped it. Maybe I am the only one.
It's hard to believe that's how Micronians are made. Why don't we see it right now by having you both kiss one another?
I still use tcsh (not for shell scripts, just interactively), essentially for a single feature. If someone can tell me how to do this in bash, I might try it again.
If you type a partial command and then press alt-p or esc-p, tcsh pulls up the most recent command in the history that matches what you typed. Not in the "!partialcmd" sense of executing something that matches, but pulling it up for editing on the command line.
Is there a key (or way to get a key) that does that in bash or not?
There's been an interesting little problem caused for people like Gentoo with the updates in bash 3.0.
http://bugs.gentoo.org/show_bug.cgi?id=58703
Just a simple move towards compliance breaks most of their scripts, so they've had to patch it out.
Lovely.
"How fine you look when dressed in rage."
Ha ha, you dorks, use MSH like a man!
:-o
I wonder how this will get modded?
Beware: In C++, your friends can see your privates!
Does anyone know if tab completion has been updated?
Specifically, the command-specific changes such as;
mount [press tab]
to see all available mount points (not just the current directory).
I know there are add-ins, though it would be good to know it's always there.
command.com-3.0. But I guess a more robust cmd.exe would do as well.
"THERE IS NO JUSTICE, THERE IS ONLY ME." -Death
Then I looked through the POSIX spec, and sure enough I found this section, which explained things:
POSIX section 23.4.18 (SHELL):
Everything else, I do in emacs...
Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
But I'm confused. Isn't this supposed to be the second movie of the trilogy?
What is so hot about bash, e.g. compared to zsh?
Seriously, I'm not trying to start a flame war here. This is coming from a really long term zsh user because back when I was just starting unix and linux a fellow bearded unix guru told me something along the lines "go with zsh, it's the best" (thas was about -95). And I've never looked back, but now seing bash being the default shell in most distros I've began to wonder what's going on. Perhaps over the years bash overtook zsh or there are some hidden qualities in bash that I don't know about.
Anyone with some insight on _both_ shells would be greatly appreciated.
1 Earth is warming, 2 It's us, 3 it's royally bad, 4 we need to take action NOW
Gentoo's various scripts rely on the fact that /bin/sh is usually symlinked to /bin/bash. With 3.0, when invoked as /bin/sh, bash behaves as it should for the first time, which caused some problems. (which are now fixed, by the way)
-truth
I had a steady B+ in my AI class until I failed the Turing test...
Ok, please tell me how I can change the SOA on 150 domain files all at once with pointing and clicking. In bash, it's: sed -i s/oldSOA/newSOA/g * Until there's a way to do search and replace on any number of files that's easier than that, the command line will still be useful.
Find out about the Lexus Rx400h Hybrid!
for i in img*.jpg; do convert $i $i:r.png; done
Slightly shorter way for zsh, in case you were using it already and didn't know about the $var:x stuff.
Rik
That's why I write a C program for every file interaction I make... I don't trust nothing but the syscalls and the compiler!
Heck, the shell could be doing ANYTHING, man... Who knows!? There may be codes in there that are like, I dunno, MESSING with my home directory, dude.
Insighful my ass.
I read the announcement and it mentions "History traversal with arrow keys", but what I would really like doesn't seem to be mentioned (but perhaps it is possible with bash-2.05, I'm not much of a shell expert). In Matlab, the up-arrow key searches the history for commands that match all the characters on the line. No characters and it acts like a normal bash arrow, if "figure, plot" is at the beginning of the line, it will quickly scroll through all plotting commands that have been entered at the shell.
Any idea if this is possible?
Dara Parsavand
you can't use a GUI interface for ever thing(admin i mean). and switching between tasks is much easier with cli.for remote admin bash+screen+ssh is heaven. agreed. Point and click is easier but not always. I find cli is much easier when doing system administration(example samba, network issues).
Well where I went they didnt for long enough that java was still 1.2.x. Of course now that I have graduated, they got a bunch of brand new G5s.
Not everything is analogous to cars. Car analogies rarely work.
Bash is a portable tool that existed long before Linux did. It is not specific or particular to Linux. So why in the world does this get posted under the category of Linux ?
for i in img*.jpg; do convert $i png:${i/.jpg/.png}; done
...and unaBASHedly so, if I may say so!
Bash can now store timestamps in the history and save them to the history file. This alone is worth the upgrade for me. The option to erase duplicates is pretty nice too.
"Ignorance more frequently begets confidence than does knowledge"
- Charles Darwin
The same can happen using the shell.
When you run a binary from the shell are you ever sure what files it's accessing?
If you log it, sure -- but there are tools to do that in the GUI, too.
Point and click is not necessarily intuitive. As Bruce Ediger said, the only intuitive interface is the nipple. After that, it's all learned.
I mod down pyramid schemes in sigs.
"Would it kill you to put down the toilet seat?" -- Maya Angelou
There's an equivalent one in bash, too. (Goes and looks it up)
for i in img*.jpg; do convert $i ${i%.jpg}.png; done
Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
This story comes under category Linux, wonders why? As we know bash runs under all *nix :)
The important thing is not to stop questioning --Albert Einstein.
Not quite the same. If there's a file called img0001.jpg.jpg, the results will differ.
${i%.png}.jpg will do it tho' (% only matches trailing patterns)
Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
The completion ability of bash has been steadily improving. There is a nice script here that sets up a lot of good completion rules for bash.
Krename ?
You like using a GUI and I like using a terminal. We're two people with two preferred methods of interacting with our machines. Your way is superior - for you. My way is superior - for me. There is no point (or obligation) to argue about which is better, since "better" is not a well-ordered set in this case.
Dewey, what part of this looks like authorities should be involved?
Guys, I'm really so excited about this. I ran around proclaiming the news about bash-3.0 in my department. Not too many people got excited (I work in Psychology) but check this out:
[user@mitral user]$ echo $BASH_VERSION
2.05a.0(1)-release
[user@mitral user]$ a | b |cat
bash: a: command not found
bash: b: command not found
[user@mitral user]$ echo $?
0
[user@mitral bash-3.0]$ echo $BASH_VERSION
3.00.0(1)-release
[user@mitral bash-3.0]$ set -o pipefail
[user@mitral bash-3.0]$ a | b |cat
bash: a: command not found
bash: b: command not found
[user@mitral bash-3.0]$ echo $?
127
Feel the love!
With zsh (and I think some other shells), you can do one liner for loops without the do/done.
.jpg` <RETURN>
For example:
for i in img*.jpg <RETURN>
convert $i `basename $i
I do for loops all the time, and in my experience zsh is most flexable with them.
he's using convert, not mv.
Give me Classic Slashdot or give me death!
Why dig through menus looking for a turkey sandwich when you could just type in that you want a turkey sandwich! Why people think that GUIs are easy to use is beyond me. Does look pretty, though.
Did anyone bother to ask the customers what they want?
Of course, your problem is that you are assuming that the very nature of a GUI is limited to what you've personally encountered.
Please explain to me what precludes a GUI from offering an advanced search tool, in which you can open up a property info dialog for the results and do bulk permission/property changes for. (Hint: nothing stops this from happening.)
timestamped history sounds like a useful auditing feature....
GO KSH!
-- Bryan
...Bush 3.0. I was wondering why the last two incarnations of your US president were so god-awful. ;)
Bad example. Using KDE, I click on my home directory icon, select the images I want to convert, right-click on one of them and pick Actions | Convert To | PNG.
This is just as quick, doesn't require you to memorise complicated syntax, and doesn't require filenames that follow a common pattern.
No, bash 3.0 is not compliant with RFC 2324.
yeah...this IS essentially the "Bourne Supremacy" ;) and hopefully the next release will be the "Bourne Ultimate-um" ;)
Find a job you like and you will never work a day in your life.
Also, find gives me even more flexibility. I want to select only those jpgs with a "2" in the filename, that are bigger than 173k, and convert those to
Or I could use the batch job to make thumbnails called thumbnails/img0001_thumb.png or whatever. KDE (and GUI's in general) lets you things the developer thinks you might want to do. Command lines, cryptic syntax and all, enable me to do *exactly* what I want to do.
Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
Can't seems to find it from ftp://ftp.cwru.edu/pub/bash, ftp://ftp.gnu.org/gnu/bash, nor from other mirrors.
The most updated version is still 2.05b, not even the patch to 3.0 is available...
My post started with +2 (cause I are 1337). Then I got an "Interesting", two "Overrated"s, a "Funny", and most recently a "Flamebait".
Come on, mods: can I have an "Insightful" and an "Underrated", too?
Dewey, what part of this looks like authorities should be involved?
The plan was to introduce new features in sub-versions like
As opposed to most open source software, which releases x.0 as soon as it compiles, and only then starts working out the stability bugs.
You cannot apply a technological solution to a sociological problem. (Edwards' Law)
How would you use the GNOME GUI to parse a dynamic HTML file, extract some data, re-format it and mail you the content on a regular basis?
OK...the "periodic" functionality can be got with a GUI based scheduler, but what would u schedule?
Open a terminal...10 minutes of shell scripting with sed, awk and a few regular expressions and your work is done through a simple shell script.
Find a job you like and you will never work a day in your life.
Why type when you can just point and click?
Because I type a lot faster than I mouse...
Cursed GTK is a text console port of GTK+ ;-)
What the hell??!!!??? Oh, and why "set-o pipefail"?
"it's not about aptitude, it's the way you're viewed" - Galinda
I amended the page for DotZshRc to point out that you really need to create both .zshrc and .zshenv from my site to get the full experience. Through this moment, over 200 people have visited the DotZshRc page, but only about 80 have seen DotZshEnv. If you're in the 120-user disjoint, then go back and snag the other one too!
Dewey, what part of this looks like authorities should be involved?
is prob. the best : )
At first glance, I didn't notice the colon and thought Microsoft was rolling out a new FUD campaign.
/. If the government wants us to respect the law, it should set a better example.
Why type when you can just point and click?
/var/log/apache/access_log|sort|uniq|wc -l
Because some tasks are easier from shell than GUI.
Take this, for example, counting the unique visits from your apache access log. How would you do this in GUI?
awk '{print$1}'
Maybe that's a stupid example, but you get my point.
www.6502asm.com - Code 6502 assembly or.. DIE!!
that does not compute here.... a two-line one-liner? //fatal
Well if the option or program you're searching for is not in the menus somewhere, you're screwed.
Having a shell ready can let you do complex operations in a short amount of time, if you know how to use simple tools such as grep and the operators.
Heck even the windows cmd.exe can be useful at times
I would absolutely +love+ to be able to have more than 8 ANSI colors in bash. Back in the BBS days, we had EGA adapters that could do 64 colors.
Hell, it would be even better if we could define RRGGBB web-style colors.
THAT would be a very feature to have in my opinion. Does anyone know if this can be done using a VGA adapter? Would we have to do it in framebuffer or something?
Don't think that a small group of dedicated individuals can't change the world. It's the only thing that ever has.
If you have one or two images then I can agree with you, but when you have converted 1000 images then right-click -> Actions -> Convert To -> PNG is the hard way and typing a "complex" command _once_ is the easy way.... // fatal
You misunderstand. The right-click... action only has to be performed once, and it operates on all selected files. You don't have to perform the action a thousand times.
No bashing old shells, please...
POSIX compliance is nice, but the Bourne shell itself is NOT POSIX compliant, and won't be made so.
/bin/sh?
So does bash, invoked as #!/bin/sh, actually behave like
"People who do stupid things with hazardous materials often die." -- Jim Davidson on alt.folklore.urban
or in the style of the wizard of oz,
bush 1.0 = lion
bush 2.0 = scarecrow
bush 3.0 = tinman (shudder)
Yeah; it surprised me when Apple switched *from* tcsh to bash. I mean, yeah the version of tcsh they used wasn't great, but still...
| sort -u
Ok, now do it every morning, at 3am, except on Sundays, and move corrupted images to the trashcan.
The point of a shell script is not to automate one-time generic tasks (that's what your context menu entry is for), but to automate one-time higly specific tasks (for which you can't reasonabily expect to have a predefined context menu entry) or unattended tasks that have to be executed many-times.
In the end, scripting everything is dumb, but requiring your presence to do the same task by hand over and over is dumber. You know the saying, "be quiet or I'll replace you with a very small shell script", there is a reason behind that.
It broke a script in 1 package, and was fixed in about 40minutes. What the hell are you talking about?
Starting up that explorer, selecting the files (manually checking if I have all of them, and only the right ones, perhaps, or having to scroll), then doing right click, is slower for me than typing in that command line.
Besides, I can still do the command line thing logged in over ssh, which is regularly.
I believe posters are recognized by their sig. So I made one.
chmod has an intelligent option (uppercase X) to set the execute bit. This sets the execute but only for directories and executables (those which have the x bit set already).
The -R does it recursively.
Not content to rename Linux, the FSF has
started in on FreeBSD too now.
If only Novell would release CDE to open source. I would love to have dtksh everywhere.
Why type when you can just point and click?
I point at putty, then click twice on putty really fast. After selecting a server, I type.
Why not use emacs for this too! In dired mode use type % R And your only a simple regular expression away from sucess ( \(.*\).jpg ---> \1.png ). Emacs - now thats an operating system ;-)
God made the natural numbers; all else is the work of man - Kronecker
Darn, I just upgraded for Doom 3, but I love the cat food game.
Many improvements /bugfixes but the same ol'ugly looking black screen...
Ash appears to consume large amounts of memory, and some people in BSD circles have serious objections to it.
See the discussion here (scroll down a bit into the postings). I don't have an opinion on the issue one way or another.
Thats only for renaming tho'. My one-liner actually converts the file format from jpeg to PNG.
Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
rm -rf /*
But seriously, a command line user who can touch type at a decent speed can appear like Commander Data -- tacka tacka tacka as stuff scrolls by on the screen at an amazing rate. It's a skill, and if you don't have it, pointing and clicking might be just as fast or faster than having to look stuff up and then hunting and pecking. But if you use the computer alot, command line + touch typing is a set of skills worth investing some time developing.
I daresay it is. That's because you aren't comparing similar tasks any more. You are missing out starting up a shell, switching to the right directory, selecting a filename pattern that matches the files you want, etc. The previous command-line example assumed that you were logged in and had already chosen the files.
Besides, Konqueror offers shortcuts - if you think it's easier to type in a filename pattern, you can do so and have only those files showing.
What's your point? X is network transparent too, and Konqueror can perform the same tasks over ssh, ftp, and a range of other protocols even if X wasn't network transparent.
The edges of my mouth were beginning to twitch into a Howard Dean smile, and then you have to call the posters morons. Why don't you give a hint that its meant to be a geeky unix joke? Now it just sounds like elitist posing.
I know its hard to tell, even for people famaliar with rbash; but this is what passes for humor among unix geeks.
Maybe they're talking about Linux, the OS?
Expert in software patents or patent law? Contribute to the ESP wiki!
We've been talking about interactive use, not scripting. If I was going to script something, I'd use Python or Perl, not a shell script. Shell scripts are pretty hideous compared with any decent scripting language. "The right tool for the job" and all that...
I think only a few would even try to argue that they are. Most shells aren only somewhat available on non *nix OSs & many aren't available ay all off of them. Bash is, at least, reasonably available on most OSs. It is also the de facto shell standard, being found on linux and most newer *nix variants.
Portable shell scripts are probably more impeded when they use tools that aren't part of the shell & which aren't on the target system.
If you want true script portability, it is probably better to use something like perl. If you are concerned with writing short, simple scripts, shell scripts are fine. But not even sh is commonly interperated, & bash is VERY common, so bash isn't really an inappropriate choice.
You moron, I wasn't the original poster.
When you must break compatibility, you increment
the major number. This serves as a warning.
So, if a bash upgrade would break scripts, then
it should get a new major number. This is the case
for some of the POSIX alignment.
Mere features and bug fixes don't deserve a new
major number.
I like bash, but the one thing that it doesn't support (out-of-the-box anyway) is auto-completion a la W2K. In NT, when you hit tab, you can cycle through all the words that can complete the letters you typed... on bash, it shows you a list.
Is there a way to make bash behave more like W2K in this sense?
This would obviously be very useful in scripts where the success or failure of a command in the pipleine would not be as determinable as watching it on screen interactively.
Outside of a dog, a book is man's best friend. Inside a dog it's too dark to read. - Groucho Marx
You're speaking in half-truths.
The top catagory for this story is Announcements. It is also listed under the following catagories: GNU, Operating Systems, Unix, and lastly Linux.
I don't think you understand. While on Windows you can use Putty to connect with SSH to a remote Unix machine to use a shell on that remote machine, on Linux you can run a local shell and do things on your local machine that you can't do with pointing-and-clicking.
Fools! He's merely using your comments to extract all the powerful shell commands in the world! What if he sells these secrets to Microsoft??! Then they'd be able to change permissions for all files or get all the porn off a website!!!11
There's a quote I'm reminded of that I recall from bash.org (ironically, heh) that said something to the effect of "if you need help from a Linux expert, don't come out and say that. Say 'Linux sucks because it can't do XXX' and you'll get 50 ways to do it."
It exposes that Gentoo is broken. There is a difference.
Windows XP users everywhere are amazed! 127!
Or just use the +X option for chmod, which will add execute permission for entries which already have them for other users. So in this example a+rX would save you some work.
I used to point and click a lot in Windows, but ever since I've installed Linux/KDE I do 99.9% of all interactions with the file system from a Konsole window. I don't know why, but using a file manager just doesn't feel right.
.
Besides, I like to do stuff like cp `locate -n1 common.file`
USE HOT GRITS WITH STATUE OF NATALIE PORTMAN (NAKED AND PETRIFIED)
Most of the time I try to use Krename to batch-rename something I end up doing most of it by hand. Especially handling extensions is a major headache.
USE HOT GRITS WITH STATUE OF NATALIE PORTMAN (NAKED AND PETRIFIED)
Nifty. Didn't know about that option. I'd always thought it would be nice to have. Guess I should have read the man page a bit eh?
"Ignorance more frequently begets confidence than does knowledge"
- Charles Darwin
urpmi package
emerge package
installpkg package
What others have I forgotten? Just about every modern distro has a cool, easy to use package installer. But when that fails, there's always the old fashioned way:
make
make install
(Score: -1, Stupid)
http://mattwalsh.com/twiki/bin/view/Main/BashDire
The one 'hole' is that command completion is a bit weird for the first element of a directory...if you have a directory that starts with 'ls', and you type ls <TAB> it will complete with 'ls'. Still, I find it to be very useful.
Does it hurt to hear them lying? Was this the only world you had?
leave 3.0 alone! >:(
Just raise the taxes on crack.
What I would like to see Bash do is command completion a la 4DOS:
If I have a command
foo bar baz
in my history, and I type
foo<TAB>
It complete that with the most recent command starting with "foo", and if I type
foo<UP>
it will cycle through the commands in history that start with "foo".
www.eFax.com are spammers
If I recall, Konquerer doesn't easily display multiple directories for this single-click change, does it? so a command line "find ./ -user X -exec chown Y {} \;" can do in one action something it would take any number of konquerer actions to do.
Boys from the City. Not yet caught by the Whirlwind of Progress. Feed soda pop to the thirsty pigs.
He knows.
You can do the same task using half as many processes.
/var/log/apache/access_log | wc -l
sort -u -k 1,2
zoidberg!
if you're preaching about "the right tool for the job", you'd recognise that python or perl is probably overkill for some of the more simpler tasks, such as the previous example of converting jpegs to pngs, or perhaps renaming a bunch of files, etc.
funny how you call shell scripts "hideous", when a not-insignificant number of people find perl syntax just as nasty (for the record, i happen to love perl).
Xfce: Lighter than some, heavier than others. Just right.
Of course, I was a bit puzzled when I couldn't find any mention of it on the GNU site....
(posted anon because I already modded)
"Linux: Bash 3.0 Released", in the slashdot Linux section - does anyone notice anything wrong with this?
Linus did not write bash. bash is a GNU project. Come on, people - it's one thing to not worry about calling Linux OSes GNU/Linux, but it's another to attribute credit to a completely unrelated party!
Does bash have "r" yet? Or has it always and I've just never found it? I don't want stupid csh "!" to repeat my commands.
And I set up bash so I can, for instance, move from rc2.d to rc3.d by typing
$ cd 2 3
?
The FSF actually does development in a very closed manner when it can (the gcc egcs split was partly because of this)
..and pshaw. egcs was a radical rewrite of GCC; it was run as a separate research project in order to be able to make huge changes and get releases out for testing without blocking bugfix work on the old, stable codebase. (Since radical rewrites tend to be high-risk.)
I've never heard that any kind of "openness" issue was involved.
*nix weenies can only wish they had the power and functionality of the mighty Windows' wsh!!!
Curiousity - anyone know if there's an RPM yet available?
This sig no verb.
This CD command replacement acts much like the well-known ACD utility used to under DOS -- it allows the user to move to a subdirectory even if only part of that subdirectory name is entered (regardless of its position in the tree), it shows an interactive picklist of options if more than one subdirectory matches the entered string, and it also provides a nice ncurses-bases interactive interface for traversing the directory tree in a visual manner.
Information, source, and binaries for various OSes can be obtained here:
WCD Wherever Change Directory
Mainframe/UNIX Bit Twiddler and long time Windows/Linux Hobbyist.
The Theorem Theorem: If If, Then Then.
Add the following two lines to the .inputrc file in your home directory (or create it if it doesn't exist):
y -search-forward
"\M-[A":history-search-backward
"\M-[B":histor
That produces 4DOS-like command history behavior, at least on my box (Mandrake 8.2).
Mainframe/UNIX Bit Twiddler and long time Windows/Linux Hobbyist.
The Theorem Theorem: If If, Then Then.
Hate to be a pedant but:
.
chmod -R a+rX
will do the same things quicker...
find . -type f -exec chmod a+r \{\} \;
Alternately, you can improve upon the speed by doing...find . -type d -exec chmod a+rx \{\} \;
in my /etc/inputrc (or ~/.inputrc) I have:
"\e[18~": history-search-forward
"\e[19~": history-search-backward
Which does a MS style (shudder) history search on F8 and F7 - it sounds like it does exactly as you mention. With a change of escape code, you could adjust the key binding.
I take it you're showing how sometimes backspacing or moving the cursor backwards along a line that exceeds the terminal's width does a strange duplication thing, making it almost impossible to edit? In my own experience, there are two main reasons why this might happen:
1. you changed the *term window size while constructing the command, so use this to enable checks for this condition: shopt -s checkwinsize
2. you have an improperly terminated escape code in your prompt. I had this problem until I started using codes like this: \[\e[0m\] rather than the other style, which I now forget.
W2K style is a real pain, and to me it seems worth installing a few hundred MB of cygwin to get the bash behaviour! I'd be more interested in knowing how to get Bash behaviour in W2K. Any ideas?
It's not necessary to start on an empty line.
This is why error messages in any language should be accompanied by an error code (usually numerical but it doesn't have to be) that is unique to the root cause of the error. Then you can search on this error code regardless of the language of the message.
I don't think you understand. He was trying to be funny.
zsh
... real geeks spend more time playing with the one-line shell script than gawking at the porn.
... Perl beats the crap out of sh for stuff like this!)
(Just waiting for a language war to break out
what? linux can make turkey sandwiches? how did you get your computer to do that from the command line? i knew i shouldn't have bought this stupid second-hand mac plus. i can't find the turkey sandwich menu anywhere, and i'm still waiting for my tab.
my-machine $uname -sr /
SunOS 5.8
my-machine $which bash
/usr/bin/bash
my-machine $pkginfo -l SUNWbash
PKGINST: SUNWbash
NAME: GNU Bourne-Again shell (bash)
CATEGORY: system
ARCH: sparc
VERSION: 11.8.0,REV=2000.01.08.18.12
BASEDIR:
VENDOR: Sun Microsystems, Inc.
DESC: GNU Bourne-Again shell (bash)
PSTAMP: humbolt20000108182543
INSTDATE: May 28 2002 10:30
HOTLINE: Please contact your local service provider
STATUS: completely installed
FILES: 7 installed pathnames
5 shared pathnames
5 directories
1 executables
1399 blocks used (approx)
not that I use it, I prefer efficent shells *cough *ksh*cough*
IANAL but write like a drunk one.
By "real debugger" I mean something that can be used to reliably debug 10,000-line "configure" scripts and debug around control flow, handle sourcing multiple files, show a call stack, debug into or skip over into functions.
Not another one.
.. and call it Kenity.
- It's not the Macs I hate. It's Digg users. -