diff options
author | Matt Kraai | 2001-05-02 17:52:49 +0000 |
---|---|---|
committer | Matt Kraai | 2001-05-02 17:52:49 +0000 |
commit | 20a3069ec0d1c242404e089cecfcc5bb7a88df0f (patch) | |
tree | fd57efa2b1398ccd505d5fbae2c2fd83798921e2 /hush.c | |
parent | 19ec9ee91e21bff2b1eb76a0633c79045eb0acee (diff) | |
download | busybox-20a3069ec0d1c242404e089cecfcc5bb7a88df0f.zip busybox-20a3069ec0d1c242404e089cecfcc5bb7a88df0f.tar.gz |
Don't treat newline as pipe separator when processing substitutions.
Diffstat (limited to 'hush.c')
-rw-r--r-- | hush.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -2010,7 +2010,10 @@ int parse_stream(o_string *dest, struct p_context *ctx, } else { if (m==2) { /* unquoted IFS */ done_word(dest, ctx); - if (ch=='\n') done_pipe(ctx,PIPE_SEQ); + /* If we aren't performing a substitution, treat a newline as a + * command separator. */ + if (end_trigger != '\0' && ch=='\n') + done_pipe(ctx,PIPE_SEQ); } if (ch == end_trigger && !dest->quote && ctx->w==RES_NONE) { debug_printf("leaving parse_stream\n"); |