#include 2){ if(iscontains(argument[1])){ if(strcmp(argument[1],”-n”)==0) printf(” “); else printf(“echo

#include #include #include #include #include bool check(char *s);void echo(char *s);void changedir(char *s);void pwd();bool iscontains(char *s);int main(int argc, char const *argv){ bool flag=true; pid_t pid; char *first=(char *)malloc(2000*sizeof(char)),*path=(char *)malloc(2000*sizeof(char)); getcwd(first,2000); strcat(first,”/”); while(flag){ strcpy(path,first); char command50={},c=’,’,*c2; int count=0,count2=0; printf(“Satyam’s Shell>>”); while(c!=’
‘){ scanf(“%c”,&c); if(c==’ ‘) count2++; if(c!=’
‘){ commandcount=c; count++; } } FILE *f=fopen(“history.txt”,”r”); while(f.read()) int asize=count2+1,i=0;         char *argumentasize;        char *temp;        temp=strtok(command,” “);        while(temp!=NULL){            argumenti=temp;              i++;            temp=strtok(NULL,” “);        }        for (int i = 0; i 2){     if(iscontains(argument1)){     if(strcmp(argument1,”-n”)==0){     for(int i=2;i