From: Eric Andersen Date: Mon, 11 Dec 2000 19:14:40 +0000 (-0000) Subject: Patch from Matt Kraai to fox sh.c escape problem such that X-Git-Tag: 0_48~27 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=b2356f6de94820291f35d63943a622708546b59c;p=oweals%2Fbusybox.git Patch from Matt Kraai to fox sh.c escape problem such that running things like 'echo "\n\tHi\n\t\!"' and 'echo -e "\n\tHi\n\t\!"' behave as under bash. --- diff --git a/lash.c b/lash.c index 07715d4e3..9fc215c98 100644 --- a/lash.c +++ b/lash.c @@ -933,8 +933,10 @@ static int parseCommand(char **commandPtr, struct job *job, struct jobSet *jobLi } /* in shell, "\'" should yield \' */ - if (*src != quote) + if (*src != quote) { *buf++ = '\\'; + *buf++ = '\\'; + } } else if (*src == '*' || *src == '?' || *src == '[' || *src == ']') *buf++ = '\\'; *buf++ = *src; diff --git a/sh.c b/sh.c index 07715d4e3..9fc215c98 100644 --- a/sh.c +++ b/sh.c @@ -933,8 +933,10 @@ static int parseCommand(char **commandPtr, struct job *job, struct jobSet *jobLi } /* in shell, "\'" should yield \' */ - if (*src != quote) + if (*src != quote) { *buf++ = '\\'; + *buf++ = '\\'; + } } else if (*src == '*' || *src == '?' || *src == '[' || *src == ']') *buf++ = '\\'; *buf++ = *src; diff --git a/shell/lash.c b/shell/lash.c index 07715d4e3..9fc215c98 100644 --- a/shell/lash.c +++ b/shell/lash.c @@ -933,8 +933,10 @@ static int parseCommand(char **commandPtr, struct job *job, struct jobSet *jobLi } /* in shell, "\'" should yield \' */ - if (*src != quote) + if (*src != quote) { *buf++ = '\\'; + *buf++ = '\\'; + } } else if (*src == '*' || *src == '?' || *src == '[' || *src == ']') *buf++ = '\\'; *buf++ = *src;