diff options
author | Rob Landley <rob@landley.net> | 2007-01-20 18:04:20 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2007-01-20 18:04:20 -0500 |
commit | 24d1d45ee901e74b3388e7053543eb16aea09ada (patch) | |
tree | e856611181383d9ca55f0d190b1de9941274ee1b /toys | |
parent | 125a2c74f2ef9438b09930b208dd88bf7538bac8 (diff) | |
download | toybox-24d1d45ee901e74b3388e7053543eb16aea09ada.tar.gz |
Add "echo". Has -n and -e (but not \0123 yet).
Diffstat (limited to 'toys')
-rw-r--r-- | toys/Config.in | 20 | ||||
-rw-r--r-- | toys/toylist.h | 1 |
2 files changed, 21 insertions, 0 deletions
diff --git a/toys/Config.in b/toys/Config.in index 570ad4cc..438785cd 100644 --- a/toys/Config.in +++ b/toys/Config.in @@ -57,6 +57,26 @@ config DF_PEDANTIC -k Sets units back to 1024 bytes (the default without -P) +config ECHO + bool "echo" + default n + help + usage: echo [-ne] [args...] + + Write each argument to stdout, with one space between each, followed + by a newline. + + -n No trailing newline. + -e Process the following escape sequences: + \\ backslash + \a alert (beep/flash) + \b backspace + \c Stop output here (avoids trailing newline) + \f form feed + \n newline + \r carriage return + \t horizontal tab + \v vertical tab config HELLO bool "hello" default n diff --git a/toys/toylist.h b/toys/toylist.h index f20b4f88..4e45924e 100644 --- a/toys/toylist.h +++ b/toys/toylist.h @@ -72,6 +72,7 @@ USE_CATV(NEWTOY(catv, "vte", TOYFLAG_USR|TOYFLAG_BIN)) USE_COUNT(NEWTOY(count, "", TOYFLAG_USR|TOYFLAG_BIN)) USE_TOYSH(NEWTOY(cd, NULL, TOYFLAG_NOFORK)) USE_DF(NEWTOY(df, "Pkt*a", TOYFLAG_USR|TOYFLAG_SBIN)) +USE_ECHO(NEWTOY(echo, "en", TOYFLAG_BIN)) USE_TOYSH(NEWTOY(exit, NULL, TOYFLAG_NOFORK)) USE_HELLO(NEWTOY(hello, NULL, TOYFLAG_USR)) USE_MKE2FS(NEWTOY(mke2fs, MKE2FS_OPTSTRING, TOYFLAG_SBIN)) |