stdbuf
stdbuf [OPCIÓN]... COMANDO
Ejecutar COMANDO, con operaciones de almacenamiento en búfer modificadas para sus flujos estándar.
Options
--input=<MODE>,-i <MODE>-
adjust standard input stream buffering
--output=<MODE>,-o <MODE>-
adjust standard output stream buffering
--error=<MODE>,-e <MODE>-
adjust standard error stream buffering
Si MODO es ‘L’ el flujo correspondiente será almacenado en búfer por líneas. Esta opción no es válida con entrada estándar.
Si MODO es ‘0’ el flujo correspondiente no tendrá búfer.
De lo contrario, MODO es un número que puede ser seguido por uno de los siguientes:
KB 1000, K 1024, MB 10001000, M 10241024, y así sucesivamente para G, T, P, E, Z, Y. En este caso el flujo correspondiente será completamente almacenado en búfer con el tamaño de búfer establecido a MODO bytes.
NOTA: Si COMANDO ajusta el almacenamiento en búfer de sus flujos estándar (tee hace por ej.) entonces eso anulará las configuraciones correspondientes cambiadas por stdbuf. También algunos filtros (como dd y cat etc.) no usan flujos para E/S, y por lo tanto no son afectados por las configuraciones de stdbuf.
Examples
Cambia el tamaño del búfer de stdin a 512 KiB:
stdbuf {{[-i|--input]}} 512K {{comando}}
Cambia el búfer de stdout a búfer por líneas:
stdbuf {{[-o|--output]}} L {{comando}}
Configura el búfer stderr sin almacenamiento en búfer:
stdbuf {{[-e|--error]}} 0 {{comando}}
The examples are provided by the tldr-pages project under the CC BY 4.0 License.
Please note that, as uutils is a work in progress, some examples might fail.