You won't see your "foo.sh" process because you are not actually
spawning off a new process. If all you have in your script is "sleep
200" then your current shell process will run that, which will show up
as "bash" in your process list, not foo.sh. You need to include the
magic line "#!/bin/bash" in order to have it spawn off a seperate
child process named foo.sh.


On Sun, 12 Oct 2003, Rick Meyerhoff wrote:

> Ok, I admit my grep was a bit faulty. I find bash processes with this:
> $ ps -e |grep '.*as.*'
>  2432 pts/2    00:00:00 bash
>  2444 pts/4    00:00:00 bash
>  2467 pts/5    00:00:00 bash
> 15087 pts/5    00:00:00 bash
> 15366 pts/4    00:00:00 bash
> 
> but substituting 'foo' for 'as' makes no difference, I still don't see 
> my script running. In fact if you capture all the output of ps with
> 
> $ ps -e > bar
> 
> and simply look at the end of the list, you see the sleep but not foo.sh.
> 
> Rick Meyerhoff wrote:
> >I tried all those and I still don't see it. I know it does not make any 
> >sense. Did you guys actually try it?
> >
> >Rick Meyerhoff wrote:
> >
> >>Try this:
> >>
> >>1. Save this one line shell script into a file called foo.sh:
> >>
> >>#
> >>sleep 200
> >>#
> >>
> >>2. $ chmod 755 foo.sh
> >>3. $ ./foo.sh
> >>4. In another terminal:
> >>$ ps -e | grep '*foo.sh*'
> >>
> >>Why doesn't the process show up?
> 
> 
> _______________________________________________
> TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
> http://www.mn-linux.org tclug-list at mn-linux.org
> https://mailman.real-time.com/mailman/listinfo/tclug-list
> 

-- 
Clay Fandre				email: clay at fandre.com
					PGP Key ID: 0x50DBBB60

_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
http://www.mn-linux.org tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list