OILS / spec / testdata / ysh-read-1.sh View on Github | oilshell.org

11 lines, 7 significant
1# Called from spec/ysh-builtins.test.sh
2
3shopt -s ysh:upgrade
4
5# Hm this preserves the newline?
6seq 3 | while read --raw-line {
7 write reply=$_reply # implicit
8}
9write a b | while read --raw-line --with-eol (&myline) {
10 write --end '' myline=$myline
11}