You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.
I would like to read a multi-line string, with proper exit code.
Here Document, and Here String methods are not optimal,
for performance, Process Substitution is desired, eg
IFS= read -d "$eot" lines < <(printf "one \ntwo \nthree \n${eot}")
using GNU bash, version 5.2.15(1)-release is it possible to read a multi line string with Process Substitution and correct exit status?
IFS= read -d "$eot" lines < <(printf "one \ntwo \nthree \n${eot}")
using GNU bash, version 5.2.15(1)-release is it possible to read a multi line string with Process Substitution and correct exit status?
this was inadvertently posted in the wrong repo! closing here and reopening in pure-bash-bible dylanaraps/pure-bash-bible#144 ...didn't know about this repo, though I appreciate it for reference, to keep my sh code sh clean!
Out of curiosity, where can we find sh on modern operating systems? Please reply here with respective reference!
from NetBSD man sh
HISTORY
A sh command appeared in Version 1 AT&T UNIX. It was replaced in
Version 7 AT&T UNIX with a version that introduced the basis of the
current syntax. That was, however, unmaintainable so we wrote this one.
This NetBSD sh is a much modified descendant of the ash shell written by
Ken Almquist.
I would like to read a multi-line string, with proper exit code.
Here Document, and Here String methods are not optimal,
for performance, Process Substitution is desired, eg
"works" however the trailing \n is missing from the string and it returns a signal 1
The following reads the string as expected, with an exit status 0
using GNU bash, version 5.2.15(1)-release
is it possible to read a multi line string with Process Substitution
and correct exit status?
The text was updated successfully, but these errors were encountered: