summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-11-07 02:09:37 +0000
committerEric Andersen <andersen@codepoet.org>2002-11-07 02:09:37 +0000
commitef5e8f8de04af2f87a77738bfbad2ac1e58605d9 (patch)
tree5a406cd39982e815c69cdbeb1c739c774cb13d62 /include
parentf9496d4e44f41b0964ec82377ab0a688ff0d06df (diff)
Implement a small strings applet
Diffstat (limited to 'include')
-rw-r--r--include/applets.h3
-rw-r--r--include/usage.h9
2 files changed, 12 insertions, 0 deletions
diff --git a/include/applets.h b/include/applets.h
index 1660b11c5..e41a48996 100644
--- a/include/applets.h
+++ b/include/applets.h
@@ -440,6 +440,9 @@
#ifdef CONFIG_START_STOP_DAEMON
APPLET_ODDNAME("start-stop-daemon", start_stop_daemon_main, _BB_DIR_SBIN, _BB_SUID_NEVER, start_stop_daemon)
#endif
+#ifdef CONFIG_STRINGS
+ APPLET(strings, strings_main, _BB_DIR_USR_BIN, _BB_SUID_NEVER)
+#endif
#ifdef CONFIG_STTY
APPLET(stty, stty_main, _BB_DIR_BIN, _BB_SUID_NEVER)
#endif
diff --git a/include/usage.h b/include/usage.h
index b66d96402..b49f3869b 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -1681,6 +1681,15 @@
"-s <signal>\t\tsignal to send (default 15)\n"\
"-a <pathname>\t\tprogram to start (default <executable>)\n"
+#define strings_trivial_usage \
+ "[-afo] [-n length] [file ... ]"
+#define strings_full_usage \
+ "Display printable strings in a binary file." \
+ "\n\nOptions:" \
+ "\n\t-f\tPrecede each string with the name of the file where it was found." \
+ "\n\t-n N\tSpecifies that at least N characters forms a sequence (default 4)" \
+ "\n\t-o\tEach string is preceded by its decimal offset in the file."
+
#define stty_trivial_usage \
"[-a|g] [-F DEVICE] [SETTING]..."
#define stty_full_usage \