Загрузить файлы в «src»

This commit is contained in:
8nlight 2023-10-04 14:27:12 +03:00
parent a596e81d2e
commit 424701f4fd
3 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,7 @@ void cat(const int fd) {
while ((len = read(fd, buf, sizeof(buf))) > 0) {
for (ssize_t i = 0; i < len; i++) {
if ((i > 0) ? buf[i - 1] == '\n' : 1 && flag)
if (((i > 0) ? buf[i - 1] == '\n' : 1) && flag)
printf(" %d ", ++lines);
printf("%c", buf[i]);
@ -30,7 +30,7 @@ int main(const int argc, const char **argv) {
flag = 1;
else if (!strcmp(argv[i], "-h")) {
printf("cat [-n] [file1 file2 ...]\n");
printf("cat [-n (numerate)] [file1 file2 ...]\n");
return 1;
}
}

View File

@ -55,7 +55,7 @@ int main(const int argc, const char **argv) {
flag = 1;
else if (!strcmp(argv[i], "-h")) {
printf("ls [-a] [Path]\n");
printf("ls [-a (Show hidden files)] [Path]\n");
return 0;
}
}

View File

@ -36,7 +36,7 @@ int main(const int argc, const char **argv) {
flags[O_MACHINE] = 1;
else if (!strcmp("-h", argv[i])) {
printf("uname [-a] [-s] [-n] [-r] [-v] [-m]\n");
printf("uname [-a (All)] [-s (Sys)] [-n (Nodename)] [-r (Release)] [-v (Version)] [-m (Machine)]\n");
return 0;
}
}