I need to get hold of a simple Unix Shell source code

I need to get hold of a simple Unix Shell source code

Post by usernam » Fri, 29 Oct 1999 04:00:00



    I'm looking to write my own simple Unix shell and instead of
reinventing the whell I'd like to have a look at how other people have
done. It if anyone could point me in the direction of some Gnu C source
I'd be grateful.
    Thanks in advance for your help.
    Jan Bannister

 
 
 

I need to get hold of a simple Unix Shell source code

Post by usernam » Fri, 29 Oct 1999 04:00:00


    I'm looking to write my own simple Unix shell and instead of
reinventing the whell I'd like to have a look at how other people have
done. It if anyone could point me in the direction of some Gnu C source
I'd be grateful.
    Thanks in advance for your help.
    Jan Bannister

 
 
 

I need to get hold of a simple Unix Shell source code

Post by Ken Pizzi » Sat, 30 Oct 1999 04:00:00



>    I'm looking to write my own simple Unix shell and instead of
>reinventing the whell I'd like to have a look at how other people have
>done. It if anyone could point me in the direction of some Gnu C source
>I'd be grateful.

ftp://ftp.gnu.org/bash/bash-2.03.tar.gz

                --Ken Pizzini

 
 
 

I need to get hold of a simple Unix Shell source code

Post by Tim Goodw » Sat, 30 Oct 1999 04:00:00



>    I'm looking to write my own simple Unix shell and instead of
>reinventing the whell I'd like to have a look at how other people have
>done. It if anyone could point me in the direction of some Gnu C source
>I'd be grateful.

Well, it's not GNU, but it's much simpler than bash.

    http://www.star.le.ac.uk/~tjg/rc/release/rc-1.6.tar.gz

By the way, please don't post HTML to usenet.

Tim.
--
Tim Goodwin   | "People think [ W. Gibson is ] hi-tech because his prose
Leicester, UK | is as pleasant to read as a C++ program." -- JT

 
 
 

I need to get hold of a simple Unix Shell source code

Post by brian hile » Tue, 02 Nov 1999 04:00:00



>     I'm looking to write my own simple Unix shell and instead of
> reinventing the wheel I'd like to have a look at how other people have
> done. It if anyone could point me in the direction of some Gnu C source
> I'd be grateful.

I guess that can be done. How about:

#define D ,close(
char*c,q[512],m[256],*v[99],**u,*i[3];int f[2],p;main(){for(m[m[60]=m[62]=
32]=m[*m=124[m]=9]=6;e(-8),gets(1+(c=q))||exit(0);r(0,0))for(;*++c;);}
r(t,o){*i=i[2]=0;for(u=v+98;m[*--c]^9;m[*c]&32?i[*c&2]=
*u,u-v^98&&++u:3)if(!m[*c]){for(*++c=0;!m[*--c];);*--u=
++c;}u-v^98?strcmp(*u,"cd")?*c?pipe(f),o=f[1]:1,(p=fork())?e(p),o?
r(o,0)D o)D*f):4,wait(0):(o?dup2(*f,0)D*f)D o):*i?1 D
0),e(open(*i,0)):5,t?dup2(t,1)D t):i[2]?9 D
1),e(creat(i[2],438)):2,e(execvp(*u,u))):e(chdir(u[1])*2):6;}
e(x){x<0?write(2,"?\n$ "-x/4,2),x+1||exit(1):5;}

Quote:>     Thanks in advance for your help.

Sure. No problem.

-Brian

 
 
 

1. A simple shell source code is needed!

I have to make a special purpose shell right now. So if there's any
one who knows where I can find the source code(C/C++) of a simple
shell, please let me know. I tried to figure out the source code of
tcsh or bash but it's too complex for me. So more simple the source
code of the shell is better for me. And of course it should work
correctly.


Thanks for reading

bye

2. Hitting the 2Gig file limit in 2.5.1 ...

3. Looking for a simple shell source code

4. ppp problem (Red Hat control panel)

5. cgi scripts not getting executed, only the source code gets displayed

6. serving NIS to BSDI: netgroup problem

7. Needed: C Code to a simple shell

8. Controling virtual desktop in X11

9. can i et hold of a copy of a telnet program's source code

10. Bourne Shell source code needed

11. Need help with finding source code for Unix compatible games

12. need source code for pipe system call for linux or unix or xinu.

13. NEEDED: Source code for unix program script ...