|
|
10.4: Update to a newer bash shell
Just issue the command chsh -s /sw/bin/bashWith that method any references to /bin/bash will still use the original version.
10.4: Update to a newer bash shell
Exactly.
10.4: Update to a newer bash shell
anyway, I'm not sure the shell really changed with the symlink method below ; bash --version give the answer of the first bash found int the PATH, not the running shell
that's why the autor should prefer ^-x ^-v for his tests, or echo $SHELL
I tried your command but I can't get any result (I cleaned my /etc/shells before of my /opt/local/bin/bash addition, and reset Netinfo to /bin/bash)
10.4: Update to a newer bash shell
System scripts that use bash (and sh, which is bash), might be dependent upon the older versions.Yep. My point was that if you want scripts (or whatever) to access a newer version then the /bin originals need to be replaced (with copies and/or links). [btw, any clue why bash and sh aren't hard linked in /bin?] But exactly the same objection can be made if you put the symlink in to /usr/bin/bash. Those scripts will still run the copy in /bin.True. For minimal intrusion in reserved system directories I'd rather install a new version of any shell in /usr/local/bin, /opt/local/bin, or /sw/bin instead of /usr/bin. Then optionally replace /bin originals (after preserving backups) with symlinks, knowing there's some risk of them being overwritten by Software Update. And likely not need to fuss with NetInfo or chsh, unless switching to a different shell.
10.4: Update to a newer bash shell
The reason they are copies and not hard links has to do with the HFS+ file system. Hard links exhibit some pathological behaviors. This is explained in a cheerfully snarkish dialog
10.4: Update to a newer bash shell
Thanks so much for posting this link. I was wondering about this strange behaviour, but thought I (being relatively new to Unix) must just be doing something wrong.
10.4: Update to a newer bash shell
10.4: Update to a newer bash shell
Another bizarre thing I noticed once about links and shells. Back before ksh was included on os x, if I needed ksh in a script, I found a hard link to zsh worked but a symbolic link caused errors in the script. The zsh manual says a soft link should be fine, but it wasn't. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysNo new commentsLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|