Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TASK A:
- #include <stdio.h>
- int main()
- {
- char i, c;
- FILE *dump;
- dump=fopen("dump.txt", "a");
- while(1)
- {
- i=fread(&c, 1, 1, stdin);
- if(c=='$') break;
- if(i>0) fwrite(&c, 1, 1, dump);
- //if(i>0) echo &c;
- }
- fclose(dump);
- }
- TASK B:
- #!/bin/bash
- grep `whoami` /etc/passwd
- TASK C:
- #!/bin/bash
- cat /usr/share/dict/words | grep -E "\<^c" | grep -E "n$"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement