Add \a and \e to "echo -e" escape handling.
This commit is contained in:
parent
f692c484ab
commit
c859f71bc9
@ -79,8 +79,10 @@ main(argc, argv)
|
|||||||
while ((c = *p++) != '\0') {
|
while ((c = *p++) != '\0') {
|
||||||
if (c == '\\' && eflag) {
|
if (c == '\\' && eflag) {
|
||||||
switch (*p++) {
|
switch (*p++) {
|
||||||
|
case 'a': c = '\a'; break;
|
||||||
case 'b': c = '\b'; break;
|
case 'b': c = '\b'; break;
|
||||||
case 'c': return 0; /* exit */
|
case 'c': return 0; /* exit */
|
||||||
|
case 'e': c = '\e'; break;
|
||||||
case 'f': c = '\f'; break;
|
case 'f': c = '\f'; break;
|
||||||
case 'n': c = '\n'; break;
|
case 'n': c = '\n'; break;
|
||||||
case 'r': c = '\r'; break;
|
case 'r': c = '\r'; break;
|
||||||
|
Loading…
Reference in New Issue
Block a user