From e0a7f917c293fbde421fbdffc9cb3dd47ff14ee2 Mon Sep 17 00:00:00 2001 From: Mark Whitley Date: Wed, 28 Mar 2001 22:04:42 +0000 Subject: [PATCH] Applied patch from David Douthitt to re-add -print option to find. Closes bug #1144. --- applets/usage.h | 1 + find.c | 3 +++ findutils/find.c | 3 +++ include/usage.h | 1 + usage.h | 1 + 5 files changed, 9 insertions(+) diff --git a/applets/usage.h b/applets/usage.h index 8ec0170e2..dde3dd146 100644 --- a/applets/usage.h +++ b/applets/usage.h @@ -429,6 +429,7 @@ "\nEXPRESSION may consist of:\n" \ "\t-follow\t\tDereference symbolic links.\n" \ "\t-name PATTERN\tFile name (leading directories removed) matches PATTERN." \ + "\t-print\t\tPrint (default and assumed).\n" \ USAGE_FIND_TYPE( \ "\n\t-type X\t\tFiletype matches X (where X is one of: f,d,l,b,c,...)" \ ) USAGE_FIND_PERM( \ diff --git a/find.c b/find.c index 15e693ab9..e814c97b9 100644 --- a/find.c +++ b/find.c @@ -143,6 +143,9 @@ int find_main(int argc, char **argv) for (i = firstopt; i < argc; i++) { if (strcmp(argv[i], "-follow") == 0) dereference = TRUE; + else if (strcmp(argv[i], "-print") == 0) { + ; + } else if (strcmp(argv[i], "-name") == 0) { if (++i == argc) error_msg_and_die("option `-name' requires an argument"); diff --git a/findutils/find.c b/findutils/find.c index 15e693ab9..e814c97b9 100644 --- a/findutils/find.c +++ b/findutils/find.c @@ -143,6 +143,9 @@ int find_main(int argc, char **argv) for (i = firstopt; i < argc; i++) { if (strcmp(argv[i], "-follow") == 0) dereference = TRUE; + else if (strcmp(argv[i], "-print") == 0) { + ; + } else if (strcmp(argv[i], "-name") == 0) { if (++i == argc) error_msg_and_die("option `-name' requires an argument"); diff --git a/include/usage.h b/include/usage.h index 8ec0170e2..dde3dd146 100644 --- a/include/usage.h +++ b/include/usage.h @@ -429,6 +429,7 @@ "\nEXPRESSION may consist of:\n" \ "\t-follow\t\tDereference symbolic links.\n" \ "\t-name PATTERN\tFile name (leading directories removed) matches PATTERN." \ + "\t-print\t\tPrint (default and assumed).\n" \ USAGE_FIND_TYPE( \ "\n\t-type X\t\tFiletype matches X (where X is one of: f,d,l,b,c,...)" \ ) USAGE_FIND_PERM( \ diff --git a/usage.h b/usage.h index 8ec0170e2..dde3dd146 100644 --- a/usage.h +++ b/usage.h @@ -429,6 +429,7 @@ "\nEXPRESSION may consist of:\n" \ "\t-follow\t\tDereference symbolic links.\n" \ "\t-name PATTERN\tFile name (leading directories removed) matches PATTERN." \ + "\t-print\t\tPrint (default and assumed).\n" \ USAGE_FIND_TYPE( \ "\n\t-type X\t\tFiletype matches X (where X is one of: f,d,l,b,c,...)" \ ) USAGE_FIND_PERM( \ -- 2.25.1