|
myshell 2.0.0
|
Team members: Andrii Yaroshevych, Pavlo Krynenko
This is a simple implementation of the cat utility. It is used to concatenate files and print on the standard output. The goal of this lab is to learn how to work with system calls and file descriptors.
This project is written in C and doesn't use any third-party libraries. So, you need to have only:
compile.sh scriptFor example:
| Option | Description |
|---|---|
-h, --help | Print help message and exit |
-A | Print all characters, including non-printable ones as \xNN |
<file1> <file2> ... <fileN> | Files to concatenate |
Note
If any of provided files cannot be opened, the program will exit with code 4 without printing any output.
| Code | Description |
|---|---|
| 1 | Unknown option provided |
| 2 | No input files provided |
| 3 | Memory allocation error |
| 4 | Error opening file |
| 5 | Error getting file status |
| 6 | Error reading from file |
| 7 | Error writing to stdout |
My implementation of cat utility is working around 7% faster than the original one.
None of the additional tasks were implemented.