HCoop
/
jackhill
/
mal.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d6e79d0
)
Bash: sh* also captures output not ending with \n.
author
Chris McCormick
<chris@mccormick.cx>
Sun, 1 Dec 2019 06:23:08 +0000
(14:23 +0800)
committer
Chris McCormick
<chris@mccormick.cx>
Sun, 1 Dec 2019 06:23:08 +0000
(14:23 +0800)
bash/stepA_mal.sh
patch
|
blob
|
blame
|
history
diff --git
a/bash/stepA_mal.sh
b/bash/stepA_mal.sh
index
1467a74
..
2c4de6d
100755
(executable)
--- a/
bash/stepA_mal.sh
+++ b/
bash/stepA_mal.sh
@@
-165,8
+165,8
@@
EVAL () {
sh__STAR__) EVAL "${a1}" "${env}"
local output=""
local line=""
- while read
line
; do
-
output="${output}${line}"$'\n'
+ while read
-r line || [ -n "${line}" ]
; do
+ output="${output}${line}"$'\n'
done < <(eval ${ANON["${r}"]})
_string "${output%$'\n'}"
return ;;