Adding Lines to Startup Shell Scripts

Raevyn

Registered
Hai!

I am lost.. I am trying to install Fink on my Mac OS 10.5, and it popped up a message saying that it knows what I am doing, so I need to a line equivalent to

source /sw/bin/init.sh

to one of my sh startup scripts.

I do NOT understand what it saying to do. Im not a shell person really and just learning. Can anyone help? I have it set to use BASH if that helps. I am also enclosing a screenshot in case that also helps.
 

Attachments

  • Fink.png
    Fink.png
    56.4 KB · Views: 4
Open Terminal (in /Applications/Utilities), and type
Code:
echo $SHELL
It should say "/bin/bash". Fink seems to think it will say "/bin/sh", but maybe it's a bug.
 
Okay weird... it actually never was changed to BASH as my roomie told me... it does say it is /bin/sh. Well... I guess thats okay.. I just want Fink to work but i am not sure how or even why it says I did something to alter it?
 
Last edited:
Go to Terminal and type
Code:
chsh -s /bin/bash
You might also need to enter
Code:
sudo chsh -s /bin/bash

Bash is the default in OS X. I don't know how yours got changed to sh. Fink won't help you with non-standard shells and assumes that if you're using one you know how to use it. Yours got changed by accident, I guess.
 
Okay i know this is off topic of the post but ElDiablo and Mikuro last comments do make me wonder... what is the real diff with all the shells anyway? BASH I know a little but it seems like it is the "standard' for most UNIX type computers (from my experience I mean) but why so many anyway? Is it really just because someone wants to make a new shell for fun, or are there any REAL differences?
 
Not really much difference at all to one who rarely ventures into the command line interface.

To others, there is a world of difference.

sh was kind of the "original shell," and the ones that followed (csh, tcsh, zsh, bash...) improved in some areas. It can be argued that bash is one of the more widely used shells, but you'll meet some that have their own preference for whatever reason.
 
I guess originally there were two shells: sh and csh: sh was for making programs ("shell scripts") and csh was for the command line interface. After that came tcsh (enhanced csh), bash (enhanced sh) and zsh (enhanced everything).
 
Back
Top