![]() |
BASH Crumbs
I still haven't gathered particular portions - umm, why BASH anyhow?
Can someone point me to the thread or link that really started this BASHing? Do most of you UN*X folk prefer BASH over the default Mac OS X shell? Why or why not? |
I considered that very same question a couple of weeks ago. Here's a couple of links you may want to check out:
http://www.mars.org/home/rob/docs/csh-whynot.html http://docs.rinet.ru:8080/UNIXs/ch13.htm Note that bash is an acronym for Bourne Again Shell. I spent several hours rummaging through other links I found on Google, and I read the comments from others on Google Groups. Further, I have a friend who is a highly regarded consultant who knows Unix inside and out. He also blessed my switch from tcsh to bash. What's interesting is that I've actually found even more references to bash being preferred since I made my decision to switch than when I was actively hunting for info. Unfortunately, since my decision was already made, I didn't keep track of the urls. But I think what really hit home for me was that while I could find numerous references recommending bash over tcsh, I did not find one single recommendation for tcsh over bash. Not even one. I thought that was most telling of all. I'm sure others with more experience can offer a more detailed reason for switching. But I highly recommend doing you own research on the web as well. Once you've looked into it, I think you'll find yourself wanting to install bash too. |
Vickishome,
After a good night sleep, I 'm back again. It is great to know you have installed Fink and Bash successfully. MervTormel advices on bash are the best to come around to the forums. You're in good hands! Sorry if you sensed a bit of bickering in the air between osxpez posts and mine. My intention was to give you some information on how Fink works. Intended for now and the future. Never suggested to you to do this way or the other exclusively. Hope you enjoy bashing and the new toy (Fink). Cheers... |
osxpez,
awk.....awk......awk....................awkkkk. :D Cheers... PS: ..........awk.......!!! :) |
osxpez,
now seriously..........you said: Quote:
The tool that Fink has for installing from source ('fink') is a wonderful tool. Extremely reliable and well done and executed. What's your particular problem with this tool? Is it because it isn't a Linux tool? I really don't know what your problem is. I am eager to know, because if it is as bad as you suggest, maybe we should tell everybody, even to the Fink developers, so they can throw it away and doesn't cause more harm. Please elaborate. Sincerely... Cheers... |
Quote:
Quote:
Note that I consider myself to be one of those Joe users. Possibly in the more Unix-knowledgable half, but anyway. I have so far never had a need to move outside apt-get in my more than a year together with OS X. But I didn't know that at first and started out with "fink" which mostly went well, if slow, but a few times things refused to install and I spent days struggling with it. Then someone told me about apt-get and it felt like coming home. I just wished someone had told me about apt-get to begin with. As for my preferences when it comes to Linux; I think GNU/Linux is great as a server OS, especially Debian. But on the desktop Linux sucks ass. You have to really and badly want to work with it. And even so there's zilch, zero, nada consistency in the GUI (or I should say GUIs because there are plenty in the same environment). OS X is king! And with Fink, no sane and, knowledgable enough, person wanting a Desktop Unix could ever choose Linux over OS X. The $100 or so it costs is way worth it. Not until the Linux community does something like Aqua will Linux ever catch up on Joe users desktops. I fully and completely adore the Fink developers. They are my heroes. |
I downloaded, installed, configured fink once. I wanted some silly package, don't even remember what it was, but it recommended or required fink...
If someone would have offered me a built-in unixy method, I believe I would have taken it. I'm still not even sure why I needed fink, as I've installed other packages successfully without it. So Sao, why are you such a staunch supporter of fink? Can't install a package without it? |
On the tcsh vs bash subject. Though I think I have often said this. :) tcsh was a revolution to interactive shells when it arrived. But with it's csh heritage tcsh as a scripting tool pretty much sucks. ksh was the king of shell scripting back then. The developers of bash tried (and succeeded) to combine the power of the tcsh as an interactive shell (cloning much of it's features) with the scripting power of ksh. That leaves pretty few reasons to stick with tcsh I would say. Since bash other ksh derived shells has arrived as well, like zsh which is part of OS X 10.1 vanilla install. From what I heard zsh is at least as good as bash and adding interactive features at that.
I can see only one reason for some OS X'ers to stick to tcsh as their default shell. Because Apple insists on being stupid about tcsh and shipping OS X with tcsh as the default shell. Quite often you see install instructions and README's and stuff showing how to set up your environment, but only tcsh examples. So you have to know some tcsh and some bash to be able to translate those instructions to your bash environment. But it's not reason enough since it's quite a small obstacle. |
osxpez,
I agree with you in 99% of what you said. Except, that if all users would be using apt-get and dselect only, the precompiled binary packages you enjoy now, the ones you are so happy to have installed in the last year with apt-get and dselect, will be much less in quantity and supply as they will be longer sleeping in the unstable branch. So it works in your own interest really to promote the use of 'fink, the tool', not for all users, or the avarage Joe or Bob, but as an 'option' that users can consider. Fink is a volunteer effort. It is because of efforts from average users, together with the Fink developers, that you can enjoy the binary packages you are using now. As this is the only way, by testing, that packages can get out of unstable and be made into precompiled binaries. The ones you love to install. And you seem to have quite some experience like you said in the unix side of things: Quote:
"Think not about what your country can do for you, but what you can do for your country" With all your experience osxpez, what about testing some packages, to help the people you adore so much...your heroes. The ball is with you, and the tools too. Cheers... |
AKcrab,
What do you want? Both osxpez and me agree 100% that Fink and the tools of Fink -apt-get, dselect, dpkg and fink are great. So what's your problem? I fail to understand. You want to have a go? If so, please, elaborate. Cheers... |
AKcrab,
There are many threads in this Forum outlining the benefits of Fink (by Sao, MervTormel, osxpez, and others), not to mention numerous other sites you can visit. If you study a little you can discover, at the very least, why others find it such a useful tool. If you still feel it does not work for you, you are certainly entitled to your opinion, but I feel your comments have an overly negative tone which seems entirely out of place. What's the matter...you can't install a package with Fink? ;) beus |
Vicki: If you can live just a few days without your fancy tcsh prompt I think you can stay with bash as your default shell. You ask some very good questions and point out some of the more ugly parts of environment management. The main being "what should go where?" and "how does it matter?". Even professional Unix distributers sometimes don't know! I once had a freshly installed Mandrake Linux 7.x and it was evident that the Mandrake team had not succeeded in getting this right. I have a working setup on my OS X though and can share it and you can see if it helps any.
I have a symbolic link looking like this: /bin/bash -> /sw/bin/bash I'm not sure if Fink did this for me but if you don't have that link you can do: $ ln -s /sw/bin/bash /bin/bash Now for what goeas where and why. Not that I'm very good at it, but the bash man page tells us that an interactive login bash shell starts out with reading /etc/profile then goes on to read any ~/.bash_profile (I'm allowing myself to simplify it some). An interactive non-login shell starts with reading ~/.bashrc. (~/ means your home directory). Typically a non-interactive shell inherits it's environment variables from the parent shell so there's no need to but much environment variable setting in any bashrc file. The idea (I think) is to put aliases and functions and stuff into the bashrc files. Still with me? Good. Let's look at my startup files then. :) In the order of their execution as statet by "man bash". Code:
$ cat /etc/profileCode:
$ cat ~/.bash_profileI think it's a quite vanilla ~/.bash_profile, but don't remember how (if) it differs from the original one. So this means that my login shell does source ~/.bashrc which looks like this: Code:
$ cat ~/.bashrcLet's move on: Code:
$ cat /etc/bashrcWith this set up I can put all environment variables that should be used for all users in /etc/profile and all aliases and functions that should be used by all users in /etc/bashrc. Any PEZ local stuff I put in ~/.bash_profile and ~/.bashrc. You can make backup copies of any versions of these files you have and then try my setup. Also you can post your ~/.login and ~/.tcshrc and what have you and people here can try help you mimic your prompt and aliases. |
Quote:
Quote:
|
osxpez,
To be exact and precise, the following hardly seems a statement for 'most' users, but in the contrary, for all users who read it. Quote:
Quote:
You can easily leave your terminal or several running in the back installing and still you could give advice about your unix love. I do it all the time. Anyhow, let's leave it at that. Sorry to have bothered you, and have a happy time using what you take from Fink and giving your good advices. I personally learned a lot from your bash post above. Cheers... |
Vicki,
Here's an in depth page (with many examples) on the Bash prompt: http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/ Here's the one I currently use (Teminal set to black background, white text): Code:
PS1="\[\033[1;33m\][\@][\u:\w]\[\033[0m\]\n\$ " |
osxpez, thank you for sharing your config files! Merv gave me his config files last night, but it was late and I was blurry-eyed so I just plopped them into my ~ dir and let it go at that. I'm going to copy your config files as well which will give me two examples of each file to work with. My first real Unix goal is to learn enough to comprehend what's in each set of config files so that I can edit them to only include what works best for me.
I have put echo tags in each file so I can track which files run when I start bash or tcsh (thanks to that long thread you guys posted long ago). This way I can see when each config file runs. This also helps me to figure out which config file to look at when there's an error. rusto, thank you! I definitely miss my old prompt. Regarding the question of fink/not fink... whether you guys meant to or not, you have both helped me to better understand what fink can do. I had read the info on the fink website, but that didn't quite explain it all as well as you two have. :) |
BTW, I must be missing something in my bash environment. Chown doesn't work! In fact, there are a number of things not working right.
For some reason, my /sw/bin/init.csh file said it was an Adobe image file. :confused: I know it's possible to change the file types using Unix, but I don't know those commands yet so I took the long route to fix the problem. I used BBEdit to copy the entire file, and put it in another file I named /sw/bin/init.csh2. Then I proceded to change the group and owner to match the original init.csh file. I had already switched to using bash as my startup shell. Chgrp worked just great. But when I attempted to use Chown, it said "command not found." Code:
$ chown root newfileCode:
$ man chmodCode:
Environment Setup Tagging: Running ~/.bash_profileOh, I did eventually get my /sw/bin/init.csh file straightened out. I switched back to tcsh as my startup shell, and made the appropriate changes that way. I just need to figure out what's wrong with my bash environment. I suspect I have a wrong path in a config file somewhere?? |
Got my man pages back in bash now. And chown is working again. :)
Merv's config files are so complex, I couldn't make heads or tails out of them. So I saved them elsewhere and plugged in osxpez's configs listed above. Now my man pages are back and chown is working. I also created the symbolic link you suggested, osxpez. Plus, I installed the utils you suggested (ls is in color! yeah!). I think I'll run with your simpler config files until I know what I'm doing a little better. I hadn't originally planned on switching to bash right now, but the book I'm reading uses bash in its examples, and so if I want to continue following the examples, I felt it was time to get bash installed. I believe I'm now at a point in which I can continue to read the book and run the examples myself so I have accomplished the goal I wanted. :) I have bash set up as my startup shell now. If I run into problems with bash, it's extremely easy to change my terminal preferences to fallback to tcsh so I haven't lost anything. osxpez, I am curious about the backspace key problem you're having. How can I find out if I'm also having that problem (thus, require the code in the configs to remedy it)? Since I'm now running your configs, I don't know how to test to see if I require that code in my configs or not. Can you elaborate on the backspace key problem or point me to a thread where you may have discussed it before? |
I might have missed someone's reply on this but bash is installed in the 10.2 installation. It's in /bin/bash. No fink required. That's for the people who aren't quite up for a fink install or like me are waiting for the couple of fink packages that I use to be updated before reinstalling fink.
|
Quote:
However, I'm going through these steps because I'm not installing Jag yet, but I want bash now. Just think... only 4 months ago, I was running my G3 with OS 8.1! Going to OS X/Unix/tcsh/bash/fink his has been a huge jump for me (and that doesn't include the fact that I have a new G4, new printer, new scanner and tons of new, upgraded software). I'm going to stick with OS X 10.1.5 until I finally catch my breath on all of these changes. |
| All times are GMT -5. The time now is 10:35 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.