Can you recommend a shell ?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Can you recommend a shell ?

Post 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
If a trainstation is where trains stop, what is a workstation ?
User avatar
NickJohnson
Member
Member
Posts: 1249
Joined: Tue Mar 24, 2009 8:11 pm
Location: Sunnyvale, California

Re: Can you recommend a shell ?

Post by NickJohnson »

What is the state of your libc and other system pieces? Are they POSIX or not?
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: Can you recommend a shell ?

Post 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.
If a trainstation is where trains stop, what is a workstation ?
User avatar
NickJohnson
Member
Member
Posts: 1249
Joined: Tue Mar 24, 2009 8:11 pm
Location: Sunnyvale, California

Re: Can you recommend a shell ?

Post 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.
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: Can you recommend a shell ?

Post by gerryg400 »

Thanks. I'll try dash first.

13 klines! Imagine that, a shell that is twice as big as my OS!
If a trainstation is where trains stop, what is a workstation ?
fronty
Member
Member
Posts: 188
Joined: Mon Jan 14, 2008 5:53 am
Location: Helsinki

Re: Can you recommend a shell ?

Post by fronty »

I thought dash wash something random from Debian, didn't know it is patched Almquist. I would've recommended Almquist. :D

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.
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Re: Can you recommend a shell ?

Post 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.
User avatar
NickJohnson
Member
Member
Posts: 1249
Joined: Tue Mar 24, 2009 8:11 pm
Location: Sunnyvale, California

Re: Can you recommend a shell ?

Post 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).
Post Reply