# SH shell or somethings more



## vigol (Dec 25, 2009)

I'm using *tcsh* for interactive/login and *sh* for scripting. 
1- Beside the *tcsh*'s command-line editor features, Is there any reason for using other shells instead of *sh*.
2- If if want have both *sh* standards and command-line editing together what's the choose? *pdksh*, ...?


----------



## graudeejs (Dec 25, 2009)

1) taste
2) I use and love shells/mksh


----------



## oliverh (Dec 25, 2009)

I'm using pdksh and tcsh. In the end there is just one rule: avoid bash.


----------



## mk (Dec 25, 2009)

"ignore bash"
how come? never to deep into shell codding but why?


----------



## vigol (Dec 25, 2009)

I havn't any plan for landing Linux, at least for current century, So Avoding *bash* is my first and last moral principle.


----------



## oliverh (Dec 25, 2009)

mk said:
			
		

> "ignore bash"
> how come? never to deep into shell codding but why?



Bash is just fat, slow and buggy - like most GNU software. Even such '_GNU_ distros' like Debian (squeeze) or the well-known Ubuntu are using dash as replacement and init-speedup. It's compatible to bash and has a low memory-footprint. 

More details to ash-variants: http://en.wikipedia.org/wiki/Almquist_shell


----------



## hedwards (Dec 27, 2009)

mk said:
			
		

> "ignore bash"
> how come? never to deep into shell codding but why?


Probably things like the way it handles the history. You can scroll back command by command, but with tcsh and some others you can type part of a command and then scroll through just the similar commands you typed.

EDIT: Is the Almquist shell available or am I missing it in the ports? Because it looks quite nice.


----------



## oliverh (Dec 27, 2009)

hedwards said:
			
		

> Probably things like the way it handles the history. You can scroll back command by command, but with tcsh and some others you can type part of a command and then scroll through just the similar commands you typed.
> 
> EDIT: Is the Almquist shell available or am I missing it in the ports? Because it looks quite nice.






> The "Almquist Shell", or "ash", which was originally a Bourne shell replacement by Kenneth Almquist; derivatives of "ash" are actually "sh" (root's shell) on NetBSD and FreeBSD.



http://bsdwiki.reedmedia.net/wiki/Demonstrate_familiarity_with_the_default_shell.html


----------



## DutchDaemon (Dec 27, 2009)

hedwards said:
			
		

> Probably things like the way it handles the history. You can scroll back command by command, but with tcsh and some others you can type part of a command and then scroll through just the similar commands you typed.



Never used ctl-r on a bash prompt?


----------



## dh (Dec 27, 2009)

I don't understand this bash-bashing. Fat? Bloated? Really? I've been using bash since '97 as user shell and it's just fine.
People who use any graphical brower or desktop envirnoment and whine if bash takes a few megabytes more memory than plain sh or other shell are just silly.


----------



## oliverh (Dec 27, 2009)

>People who use any graphical brower or desktop envirnoment and whine if bash takes a few megabytes more memory than plain sh or other shell are just silly. 

Do you really know what I'm using? I've been avoiding GNU-crap since the early 90s. I was a happy Irix user, I'm a happy *BSD user now. I'm constantly looking for proper code and as less as possible bloat. I don't really care about BSDL Vs GPL (at least at home), but what I do care about is buggy and bloated software often found among the GNU project, like bash or GCC.

If it's okay for you, why don't you use GNU/Linux? In the end it's their credo: just for fun. Well, people that are using e.g. Ubuntu, shouldn't care about such things - it's noise for them, isn't it? But we're using *BSD, because of K.I.S.S., because of _quality_, because of a very low ressource-footprint, because we do care about small things in the background. Easy, isn't? And guess what? There are many more Linux users who think as well!


----------



## fronclynne (Dec 27, 2009)

dh said:
			
		

> I don't understand this bash-bashing. Fat? Bloated? Really? I've been using bash since '97 as user shell and it's just fine.
> People who use any graphical brower or desktop envirnoment and whine if bash takes a few megabytes more memory than plain sh or other shell are just silly.



It's not that anyone who bashes bash likely despises bash for being bash, more for it being the default scripting language for the cruddier linux distros & the obnoxious ubiquity where Real Honest & Gentle sh syntax would (a) work exactly as well (b) not break on systems that don't have bash.  Especially hot and smelly hell fires await the dreadful people who use bashy constructions but sill prefix their scripts with #!/bin/sh.


----------



## DutchDaemon (Dec 27, 2009)

fronclynne said:
			
		

> It's not that anyone who bashes bash likely despises bash for being bash, more for it being the default scripting language for the cruddier linux distros



Just what I was about to say (not in those exact words, maybe). Bash is a very pleasant shell for daily use. I don't script in it anymore (my bash scripts were actually 95% sh-compliant to begin with, so I just made that 100% and made them all /bin/sh), but I find it an easy-to-navigate and functional shell which I've used on FreeBSD since about 1995. And I've tried any *sh by now, but I can't get used to them (anymore, I guess).


----------



## fronclynne (Dec 27, 2009)

DutchDaemon said:
			
		

> I find it an easy-to-navigate and functional shell which I've used on FreeBSD since about 1995. And I've tried any *sh by now, but I can't get used to them (anymore, I guess).



Indeed.  I use tcsh on FreeBSD, but I'm not horrified at using bash on opensolaris (though the philosophical point of Sun moving away from Bill Joy's own shell is a bit odd to me.  I guess opensolaris thinks it can compete better with linux by becoming linux?) or linux for that matter.  I do sometimes find myself typing "rehash" in bash, but for most day-to-day running stuff it doesn't matter to me which I use.


----------



## DutchDaemon (Dec 27, 2009)

alias to hash -r


----------



## oliverh (Dec 27, 2009)

fronclynne said:
			
		

> Indeed.  I use tcsh on FreeBSD, but I'm not horrified at using bash on opensolaris (though the philosophical point of Sun moving away from Bill Joy's own shell is a bit odd to me.  I guess opensolaris thinks it can compete better with linux by becoming linux?) or linux for that matter.  I do sometimes find myself typing "rehash" in bash, but for most day-to-day running stuff it doesn't matter to me which I use.



The massive GNUish influence is indeed a friendly hello towards Linux professionals, which want to migrate to Solaris. Most Linux people using FreeBSD for the first time are complaining about missing 'features' a la 'where are my colors in the console','bash anyone?' and so on.


----------



## DutchDaemon (Dec 28, 2009)

The last thing I need is colours in the console! Just thought I'd make that clear here


----------



## oliverh (Dec 28, 2009)

DutchDaemon said:
			
		

> The last thing I need is colours in the console! Just thought I'd make that clear here



You don't need colors? *sigh* another dinosaur  ;-)


----------



## Deleted member 9563 (Dec 28, 2009)

Did someone say dinosaur?

I have a need for clarity in my computing environment (and elsewhere) so I prefer the console whenever possible since GUIs are very messy and extremely difficult to manage for an amateur like me. Consequently I find that colours are very important. The best monitor that I have ever used is the IBM 5151. I'm sure many here are familiar with it. It is not black and white but rather uses a very effective green phosphor which has a much slower response time than phosphors used in the later VGA monitors. The visual stability compared to VGA and later monitors is startling, but to me the most important thing is the colour. Green is so much easier to focus on (relaxing) than anything else because of the wavelength. Eyes are just not achromatic and there is no way around that. You cannot focus effectively on mixed wavelengths using a single lens such as the eye contains. Hence the lower stresses involved when using a frequency in the middle of the spectrum. That is why I use colour in my terminal - green to be exact. 

There is another reason for using colour. When looking at a screen full of history it requires actual reading effort ot pick out the prompt lines. From my perspective, this is wasted energy which I could be using to think. In any case, it stresses me out. However, I find that I don't actually have to read the detail of those lines, but rather need to know where they are in relation to the others. The solution is to make the prompt a different colour.

Anyway, that is what I do in DOS and I am yet so new to FreeBSD that I haven't quite figured out the ANSI thing.  I have to tell you folks though, that although I've also been using Linux for a few years, FreeBSD is so much more newbie friendly that it probably won't take me long to get what I want out of it. Linux is just not as good for older folk like me because of it's emphasis on complexity.


----------



## vigol (Dec 29, 2009)

> Green is so much easier to focus on (relaxing)


whenever is possible I use these settings: 
BG Colour *#0{6}* FG Colour *#D8FFBF* = Lovely Green, Check it


----------



## Beastie (Dec 29, 2009)

vigol, are you still talking about shell colors, or about terminal emulator colors?

By default I use sh for scripting and t/csh for interactive work. And I can't stand colors when I'm at the shell.


----------



## vigol (Dec 29, 2009)

> whenever is *possible*


anyway it's my fault, I made a bad switch to *Terminal Emulator* in my reply.sorry


----------

