aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-05-02 17:52:49 +0000
committerkraai <kraai@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-05-02 17:52:49 +0000
commit54ccad04320b8f810cb13384dfa2eb429d5260a3 (patch)
treefd57efa2b1398ccd505d5fbae2c2fd83798921e2 /shell
parent4385f4ffe51db62f789ad3d6ae990f297f576c64 (diff)
downloadbusybox-w32-54ccad04320b8f810cb13384dfa2eb429d5260a3.tar.gz
busybox-w32-54ccad04320b8f810cb13384dfa2eb429d5260a3.tar.bz2
busybox-w32-54ccad04320b8f810cb13384dfa2eb429d5260a3.zip
Don't treat newline as pipe separator when processing substitutions.
git-svn-id: svn://busybox.net/trunk/busybox@2515 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'shell')
-rw-r--r--shell/hush.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/shell/hush.c b/shell/hush.c
index c55d86f5d..01fd33486 100644
--- a/shell/hush.c
+++ b/shell/hush.c
@@ -2010,7 +2010,10 @@ int parse_stream(o_string *dest, struct p_context *ctx,
2010 } else { 2010 } else {
2011 if (m==2) { /* unquoted IFS */ 2011 if (m==2) { /* unquoted IFS */
2012 done_word(dest, ctx); 2012 done_word(dest, ctx);
2013 if (ch=='\n') done_pipe(ctx,PIPE_SEQ); 2013 /* If we aren't performing a substitution, treat a newline as a
2014 * command separator. */
2015 if (end_trigger != '\0' && ch=='\n')
2016 done_pipe(ctx,PIPE_SEQ);
2014 } 2017 }
2015 if (ch == end_trigger && !dest->quote && ctx->w==RES_NONE) { 2018 if (ch == end_trigger && !dest->quote && ctx->w==RES_NONE) {
2016 debug_printf("leaving parse_stream\n"); 2019 debug_printf("leaving parse_stream\n");