Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Bash shell and jot' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Bash shell and jot
Authored by: el bid on Nov 19, '01 02:40:22AM

> Please also note that the syntax used here is of the Bourne
> shell variety. If you don't have 'bash' installed, when you
> open up a terminal window, type 'sh' and then enter to run
> a Bourne shell.

Useful takedown on jot, but the above doesn't seem to make a lot of sense. If you don't have Bash installed, you don't have Bash installed. What you'll get carrying out the instructions above is whatever is linked to /bin/sh, which in the default Mac OS X system is tcsh.

If you _do_ happen to have Bash installed, but not running as the current user's default shell, you're better off running /<pathtoBash> rather than just sh.

--
el bid



[ Reply to This | # ]
Bash shell and jot
Authored by: pmccann on Dec 01, '01 12:14:24PM

This can't be correct or our beloved osx boxes wouldn't boot! All 'dem shell scripts executed at startup (all with "#!/bin/sh" as their opening play) would just vanish in a flash of incompatible syntax.

/bin/sh can't be tcsh, but is of course ye olde worlde Bourne shell (as distinct from bash).

The shell scripts listed in the article should work fine post entering "/bin/sh" (or even just "sh" if you haven't changed your default PATH).

Just for the archive!

Paul



[ Reply to This | # ]
Bash shell and jot
Authored by: bsletten on Dec 02, '01 05:04:12PM

You are correct, that didn't make a whole lot of sense, but it should still work. I guess I was thinking that anyone with a leaning toward Bourne shells would have installed bash (as opposed to the default shell with OS X). bash and sh have the same basic programmatic syntax at least as far as the examples were concerned. I was anticipating that people playing around with it might get confused typing the shell constructs into a csh interpreter and miss the larger issue of learning jot. I also expected them to play around interactively so I wasn't worried about making sure they built scripts properly....

Oh well.



[ Reply to This | # ]