summaryrefslogtreecommitdiffstats
path: root/bin/sh
diff options
context:
space:
mode:
authormph <mph@FreeBSD.org>2000-06-26 22:43:30 +0000
committermph <mph@FreeBSD.org>2000-06-26 22:43:30 +0000
commitbedabe82c4b4ede881dd7032ec9d84c5aad25c5d (patch)
tree799155a4831b6007e96922da2ce7b954f146cc1d /bin/sh
parent0784a9a9df4574d64232c5d1ac996c36545b0898 (diff)
downloadFreeBSD-src-bedabe82c4b4ede881dd7032ec9d84c5aad25c5d.zip
FreeBSD-src-bedabe82c4b4ede881dd7032ec9d84c5aad25c5d.tar.gz
Add \a and \e to "echo -e" escape handling.
Diffstat (limited to 'bin/sh')
-rw-r--r--bin/sh/bltin/echo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/bin/sh/bltin/echo.c b/bin/sh/bltin/echo.c
index 8ce088a..850a811 100644
--- a/bin/sh/bltin/echo.c
+++ b/bin/sh/bltin/echo.c
@@ -79,8 +79,10 @@ main(argc, argv)
while ((c = *p++) != '\0') {
if (c == '\\' && eflag) {
switch (*p++) {
+ case 'a': c = '\a'; break;
case 'b': c = '\b'; break;
case 'c': return 0; /* exit */
+ case 'e': c = '\e'; break;
case 'f': c = '\f'; break;
case 'n': c = '\n'; break;
case 'r': c = '\r'; break;
OpenPOWER on IntegriCloud