Page 1 of 1
Can you recommend a shell ?
Posted: Sat Jun 05, 2010 6:05 am
by gerryg400
Hi,
Can anyone recommend a simple shell I can port to my OS ? Right now I'm considering dash. I have it almost compiling with my cross compiler.
Is this a good choice ? My goal is to be able to compile my kernel natively so I need something that will ultimately be able to configure and make binutils/gcc/newlib.
Thanks
Re: Can you recommend a shell ?
Posted: Sat Jun 05, 2010 9:09 am
by NickJohnson
What is the state of your libc and other system pieces? Are they POSIX or not?
Re: Can you recommend a shell ?
Posted: Sat Jun 05, 2010 9:28 am
by gerryg400
Yes I'm following Posix. I've just moved to newlib. I'll have fork and exec again soon. Working on open and read right now. Is that what you meant?
BTW, you inspired me to stop work on my ext2 fs. It was taking too long so I spent today making a tarfs. It'll allow me to get things going again much more quickly. I'm working on my entire todo list in parallel.
Re: Can you recommend a shell ?
Posted: Sat Jun 05, 2010 9:41 am
by NickJohnson
In that case, dash is probably a good choice. IIRC, it doesn't have any dependencies (unlike bash, which has readline and other big stuff), so it should be easy to port. If that doesn't work, there is a maintained version of the original bourne shell floating around somewhere on the internet (search "heirloom bourne shell"), which doesn't fully satisfy POSIX but should run a lot of existing scripts and is only about 13K lines.
Re: Can you recommend a shell ?
Posted: Sat Jun 05, 2010 9:56 am
by gerryg400
Thanks. I'll try dash first.
13 klines! Imagine that, a shell that is twice as big as my OS!
Re: Can you recommend a shell ?
Posted: Sun Jun 06, 2010 4:19 am
by fronty
I thought dash wash something random from Debian, didn't know it is patched Almquist. I would've recommended Almquist.
Korn may also be nice when implementing userland stuff with its nice language, IIRC it lacks only OO and namespaces when compared to Perl. You have to search quite high and low when you look for existing script which works with sh but not with ksh.
Re: Can you recommend a shell ?
Posted: Mon Jun 07, 2010 6:53 am
by JamesM
NickJohnson wrote:In that case, dash is probably a good choice. IIRC, it doesn't have any dependencies (unlike bash, which has readline and other big stuff), so it should be easy to port. If that doesn't work, there is a maintained version of the original bourne shell floating around somewhere on the internet (search "heirloom bourne shell"), which doesn't fully satisfy POSIX but should run a lot of existing scripts and is only about 13K lines.
Bash comes with its own readline - it has no dependencies other than libc.
Re: Can you recommend a shell ?
Posted: Mon Jun 07, 2010 8:22 am
by NickJohnson
gerryg400 wrote:13 klines! Imagine that, a shell that is twice as big as my OS!
Well, dash is over 15K (which is still less than I thought).