Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<unistd.h>
- #include<string.h>
- #include<fcntl.h>
- #include<sys/stat.h>
- #include<sys/types.h>
- #include<ctype.h>
- int main()
- {
- char *myfifo="/home/konrad/Pulpit/program2.1/pipe";
- int fd;
- char tab[30];
- fd=open(myfifo,O_RDONLY);
- //fgets(tab,30,stdin);
- read(fd,tab,31);
- for(int i=0;i<30;i++)
- {
- if(islower(tab[i])) tab[i]=toupper(tab[i]);
- }
- close(fd);
- fd=open(myfifo,O_WRONLY);
- write(fd,tab,31);
- close(fd);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement