Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forking

Status
Not open for further replies.

sumncguy

IS-IT--Management
May 22, 2006
118
US

I constantly finding myself working with a list or seedfile and serially perform functions on each in the list.

I would like to learn how to fork in shell. For arguements sake, If I had a list of 50 ips that I wanted to ping, I want to break the list of 50 into smaller processes of 5, 10 ips each.

So .. sumtin like ...

while read ip
do
ping $ip
done < seedfileorlist

I have read the man page on fork. To be honest, sometimes the man pages are more confusing then helpful to me.

The question is can someone give me another resource that explains forking in laymans term method or better yet, give me a way to execute the above then I could use set to try to pick it apart.

Thanks alot in advance for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top