This commit is contained in:
Your Name 2023-10-22 09:26:38 +03:00
parent 28c02fbae1
commit cbb34324f5
4 changed files with 5 additions and 5 deletions

View File

@ -5,8 +5,8 @@
#include <errno.h>
int main(const int argc, char **argv) {
if (argc < 3 || !strcmp(argv[argc - 1], "-h")) {
printf("chroot [dir] [\"command arg\"]\n");
if (argc < 3 || !strcmp(argv[argc - 1], "--help")) {
printf("chroot [dir] [command arg arg2...]\n");
return 0;
}

View File

@ -31,7 +31,7 @@ int move(const char *src, const char *dst) {
}
int main(const int argc, const char **argv) {
if (argc <= 2 || !strcmp(argv[argc - 1], "-h")) {
if (argc <= 2 || !strcmp(argv[argc - 1], "--help")) {
printf("mv [Src1 src2...] [Dst]\n");
return 0;
}

View File

@ -59,7 +59,7 @@ int rmtree(const char *path) {
}
int main(const int argc, char **argv) {
if (argc == 1 || !strcmp(argv[argc - 1], "-h")) {
if (argc == 1 || !strcmp(argv[argc - 1], "--help")) {
printf("rm [src1 src2...]\n");
return 0;
}

View File

@ -13,7 +13,7 @@ double convert(const char *num) {
}
int main(const int argc, const char **argv) {
if (argc == 1 || !strcmp(argv[argc - 1], "-h")) {
if (argc == 1 || !strcmp(argv[argc - 1], "--help")) {
printf("sleep [num[m - minute / h - hour / d - days]] / [inf (infinity)]\n");
return 0;
}