aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2014-01-12 08:48:46 +0000
committerRon Yorston <rmy@pobox.com>2014-01-12 08:48:46 +0000
commite371e46fa07eb850d28bc5738e04e6575c32be2e (patch)
tree26754421577f07cc0fe63dffe7982b81d874a7cf /shell
parent3eff46194e1879b27017df5fb18862289c07f57c (diff)
downloadbusybox-w32-e371e46fa07eb850d28bc5738e04e6575c32be2e.tar.gz
busybox-w32-e371e46fa07eb850d28bc5738e04e6575c32be2e.tar.bz2
busybox-w32-e371e46fa07eb850d28bc5738e04e6575c32be2e.zip
shell: add \r to IFS
When commands run in backquotes generated multiple lines of output the carriage returns weren't being removed. Adding \r to IFS fixes this.
Diffstat (limited to 'shell')
-rw-r--r--shell/shell_common.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/shell/shell_common.c b/shell/shell_common.c
index 782d47285..52e1025a2 100644
--- a/shell/shell_common.c
+++ b/shell/shell_common.c
@@ -20,7 +20,11 @@
20#include "shell_common.h" 20#include "shell_common.h"
21#include <sys/resource.h> /* getrlimit */ 21#include <sys/resource.h> /* getrlimit */
22 22
23#if !ENABLE_PLATFORM_MINGW32
23const char defifsvar[] ALIGN1 = "IFS= \t\n"; 24const char defifsvar[] ALIGN1 = "IFS= \t\n";
25#else
26const char defifsvar[] ALIGN1 = "IFS= \t\n\r";
27#endif
24 28
25 29
26int FAST_FUNC is_well_formed_var_name(const char *s, char terminator) 30int FAST_FUNC is_well_formed_var_name(const char *s, char terminator)