Quote:
Originally Posted by
sdsd
ok, so shell scripting is done in C? I was under the impression that it was with using those echo commands etc like using batch files in MSDOS.
Err... no. Shell scripting is done in the language of whatever command shell you choose to use, whether it happens to be MS-DOS (
COMMAND.COM), C shell (
/usr/bin/csh), Korn shell (
/usr/bin/ksh), bash, zsh, sh, .... the list goes on. Shell scripting is a generic term.
C shell just happens to be a shell that uses some constructs that are similar to the C programming language, which may be convenient for a C programmer, however (as you have demonstrated) it causes some confusion, and doesn't necessarily result in the most well defined scripting language.
The shells themselves are for the most part compiled C binaries. I really don't think you would be adding much value by writing yet another shell, unless of course it is purely for your own educational purposes. The common Unix shells are generally powerful enough to allow you to customise them by using scripting.