diff options
-rw-r--r-- | include/usage.h | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/include/usage.h b/include/usage.h index 8b1a8d785..c4516e0eb 100644 --- a/include/usage.h +++ b/include/usage.h | |||
@@ -849,9 +849,21 @@ | |||
849 | "\t-I initstring\tSets the init string to send before anything else\n" \ | 849 | "\t-I initstring\tSets the init string to send before anything else\n" \ |
850 | "\t-H login_host\tLog login_host into the utmp file as the hostname" | 850 | "\t-H login_host\tLog login_host into the utmp file as the hostname" |
851 | 851 | ||
852 | 852 | #if ENABLE_FEATURE_GREP_EGREP_ALIAS | |
853 | #define USAGE_GREP_E(a) a | ||
854 | #else | ||
855 | #define USAGE_GREP_E(a) | ||
856 | #endif | ||
857 | #if ENABLE_FEATURE_GREP_CONTEXT | ||
858 | #define USAGE_GREP_CTX(a) a | ||
859 | #else | ||
860 | #define USAGE_GREP_CTX(a) | ||
861 | #endif | ||
853 | #define grep_trivial_usage \ | 862 | #define grep_trivial_usage \ |
854 | "[-ihHnqvs] PATTERN [FILEs...]" | 863 | "[-ihHnqvs" \ |
864 | USAGE_GREP_E("E") \ | ||
865 | USAGE_GREP_CTX("ABC") \ | ||
866 | "] PATTERN [FILEs...]" | ||
855 | #define grep_full_usage \ | 867 | #define grep_full_usage \ |
856 | "Search for PATTERN in each FILE or standard input.\n\n" \ | 868 | "Search for PATTERN in each FILE or standard input.\n\n" \ |
857 | "Options:\n" \ | 869 | "Options:\n" \ |
@@ -859,10 +871,20 @@ | |||
859 | "\t-h\tsuppress the prefixing filename on output\n" \ | 871 | "\t-h\tsuppress the prefixing filename on output\n" \ |
860 | "\t-i\tignore case distinctions\n" \ | 872 | "\t-i\tignore case distinctions\n" \ |
861 | "\t-l\tlist names of files that match\n" \ | 873 | "\t-l\tlist names of files that match\n" \ |
874 | "\t-L\tlist names of files that do not match\n" \ | ||
862 | "\t-n\tprint line number with output lines\n" \ | 875 | "\t-n\tprint line number with output lines\n" \ |
863 | "\t-q\tbe quiet. Returns 0 if result was found, 1 otherwise\n" \ | 876 | "\t-q\tbe quiet. Returns 0 if PATTERN was found, 1 otherwise\n" \ |
864 | "\t-v\tselect non-matching lines\n" \ | 877 | "\t-v\tselect non-matching lines\n" \ |
865 | "\t-s\tsuppress file open/read error messages" | 878 | "\t-s\tsuppress file open/read error messages\n" \ |
879 | "\t-c\tonly print count of matching lines\n" \ | ||
880 | "\t-f\tread PATTERN from file\n" \ | ||
881 | "\t-e\tPATTERN is a regular expression\n" \ | ||
882 | "\t-F\tPATTERN is a set of newline-separated strings" \ | ||
883 | USAGE_GREP_E("\n\t-E\tPATTERN is an extended regular expression") \ | ||
884 | USAGE_GREP_CTX("\n\t-A\tprint NUM lines of trailing context") \ | ||
885 | USAGE_GREP_CTX("\n\t-B\tprint NUM lines of leading context") \ | ||
886 | USAGE_GREP_CTX("\n\t-C\tprint NUM lines of output context") | ||
887 | |||
866 | #define grep_example_usage \ | 888 | #define grep_example_usage \ |
867 | "$ grep root /etc/passwd\n" \ | 889 | "$ grep root /etc/passwd\n" \ |
868 | "root:x:0:0:root:/root:/bin/bash\n" \ | 890 | "root:x:0:0:root:/root:/bin/bash\n" \ |