#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/wait.h>
#include <stdint.h>
#include <fcntl.h>

main(int *argc, char **argv)
{ pid_t pID;
 
/*    pID=fork();
    if (pID<0) { printf("failed to fork\n"); exit(-1);}
*/

    pID=fork();
    if (pID<0) { printf("failed to fork\n"); exit(-1);}
    if (pID==0) { 
        system("lynx --source --dump www.test10000.com/wordpress/ > index0.html");
	system("lynx --source --dump  www.test10000.com/wordpress/ > index00.html");
    }
    else
    {
        pID=fork();
        if (pID<0) { printf("failed to fork\n"); exit(-1);}
        if (pID==0) { 
            system("lynx --source --dump www.test10001.com/wordpress/ > index1.html");
	    system("lynx --source --dump www.test10001.com/wordpress/ > index11.html");
        }
        else
        {
            pID=fork();
            if (pID<0) { printf("failed to fork\n"); exit(-1);}
            if (pID==0) { 
                system("lynx --source --dump www.test10002.com/wordpress/ > index2.html");
	        system("lynx --source --dump www.test10002.com/wordpress/ > index22.html");
            }
            else
            {

                pID=fork();
	        if (pID<0) { printf("failed to fork\n"); exit(-1);}
    	        if (pID==0) { 
                    system("lynx --source --dump www.test10003.com/wordpress/ > index3.html");
	            system("lynx --source --dump www.test10003.com/wordpress/ > index33.html");
                }
                else
                {
	            pID=fork();
	            if (pID<0) { printf("failed to fork\n"); exit(-1);}
	            if (pID==0) { 
	                system("lynx --source --dump www.test10004.com/wordpress/ > index4.html");
	            	system("lynx --source --dump www.test10004.com/wordpress/ > index44.html");
	            }
	            else
	            {
	                pID=fork();
	                if (pID<0) { printf("failed to fork\n"); exit(-1);}
	                if (pID==0) { 
	                    system("lynx --source --dump www.test10005.com/wordpress/ > index5.html");
	            	    system("lynx --source --dump  www.test10005.com/wordpress/ > index55.html");
	                }
	                else
	                {
	                    pID=fork();
	                    if (pID<0) { printf("failed to fork\n"); exit(-1);}
	                    if (pID==0) { 
	                	system("lynx --source --dump www.test10006.com/wordpress/ > index6.html");
	            		system("lynx --source --dump www.test10006.com/wordpress/ > index66.html");
		            }
	    	            else
	        	    {
	            		pID=fork();
		        	if (pID<0) { printf("failed to fork\n"); exit(-1);}
	        		if (pID==0) { 
	                	    system("lynx --source --dump www.test10007.com/wordpress/ > index7.html");
	            		    system("lynx --source --dump www.test10007.com/wordpress/ > index77.html");
	            		}
	            		else
	            		{
	            		    pID=fork();
		        	    if (pID<0) { printf("failed to fork\n"); exit(-1);}
	        		    if (pID==0) { 
	                		system("lynx --source --dump www.test10008.com/wordpress/ > index8.html");
	            			system("lynx --source --dump www.test10008.com/wordpress/ > index88.html");
	            		    }
	            		    else
	            		    {
	            			system("lynx --source --dump www.test10009.com/wordpress/ > index9.html");
	            			system("lynx --source --dump www.test10009.com/wordpress/ > index99.html");
	            		    }
	            		};
	            	    };
        		};
        	    };
        	};
            };
        }
    };
return 0;
}
