Loop through Children GameObjects

I currently have several game objects nested inside a master game object. Is there a way to loop through them so I can call a particular script attached.

Also if you try to get a component that doesn't exist what will happen. I'm not 100% sure if all the game objects are going to have that particular script attached.

I'm using C#.

GetComponentsInChildren sounds like what you need. If that's not enough info, please tell us more.

(1) to find children see:

http://answers.unity3d.com/questions/2944/how-can-i-access-the-children-of-a-transform

(2) You need to catch error:

if(!gameObject.GetComponent(component_name))

do nothing or output error message; 

if(gameObject.GetComponent(component_name))
do something;