Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/bin/sh



Module Name:    src
Committed By:   kre
Date:           Fri Oct 11 09:02:10 UTC 2024

Modified Files:
        src/bin/sh: miscbltin.c sh.1

Log Message:
Add -b and -nMAX options to the read builtin.

As requested on (perhaps more than one) mailing list, this adds
a -n MAX option, to allow the amount of data read by the read
builtin to be limited to MAX bytes (in case the record delimiter
doesn't appear in the input for a long time).   There is
currently an upper bound of 8MiB on the value of MAX.

Also add a -b option, which allows for buffered input (with
some usage caveats) rather than 1 byte at a time.

Neither option exists in SMALL shells.

Note that the proposed -z option got deleted ... I couldn't
find a rational way to explain what the final state would be
if a \0 on input generated an error, so rather than have
things ambiguous, better just not to have the option, and
simply keep ignoring input \0's as always.

See the (updated) sh(1) man page for more details.

No pullups planned (new feature, only for new releases).


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/bin/sh/miscbltin.c
cvs rdiff -u -r1.265 -r1.266 src/bin/sh/sh.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index