#include <stdio.h>
#include <string.h>
#include<unistd.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>
int main(int argc,char* argv[])
{
if(argc != 2){
printf("Format should be:myCat filename/n");
}
int from_fd;
char buf[255];
from_fd = open("./argv[1]",O_RDONLY);
while(1){
int r = read(from_fd,buf,strlen(buf));
write(1,buf,strlen(buf));
if(r = 0){
break;
}
}
write(1,argv[1],strlen(argv[1]));
printf("/n");
return 0;
}