need help to understand and write script in fork

Can anybody help me for writing unix shell scripting on fork();
it will be appreciated, if any body can send me sample, tutorial ...with details.

If you're familiar with C, see this

If you're familiar with Perl, see this

hey thanx, but i am a layman to fork, how my scripts which is shell script use this forking process, do you have sample tutorial with description......
it will be appreciated, if you can teach me fork.

Advanced Bash-Scripting Guide has some information and an example:

hey MA,

THANX A LOT........BUT WILE GOING THRU THE SAMPLE I FOUND THERE IS A WORD pidof , WHAT IS THIS ???? IS THIS A KEYWORD OR SOMETHONG ELSE....IF SO CAN U EXPLAIN PLEASE ......

pidof finds the process ID of a running program. A good way to understand things is to try them out: go to your command shell and execute "pidof sh" or "pidof bash".

In a script, you could use "$$" to get the Process ID of the script instance but pidof has the extra advantage of giving you *all* process ids of instances of the script.