Timeline for How to run a pipe safely and sequentially?
Current License: CC BY-SA 3.0
13 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Aug 26, 2017 at 14:48 | comment | added | xhienne | Thanks @StéphaneChazelas and Kusalananda, answer updated consequently | |
| Aug 26, 2017 at 14:46 | history | edited | xhienne | CC BY-SA 3.0 | added 423 characters in body |
| Aug 26, 2017 at 13:38 | comment | added | Stéphane Chazelas | @Kusalananda ls -ld /proc/self/fd/0 <<< x on Linux gives a deleted regular temp file in ${TMPDIR-/tmp} | |
| Aug 26, 2017 at 13:33 | comment | added | Kusalananda♦ | @StéphaneChazelas I'm not 100% certain, but I think Bash creates a temp file. Ok. | |
| Aug 26, 2017 at 12:55 | comment | added | Kusalananda♦ | @StéphaneChazelas Thanks. Would you know if <<< is implemented with temporary files in bash? I could check the code, but if you know... | |
| Aug 26, 2017 at 12:48 | comment | added | Stéphane Chazelas | @Kusalananda, that depends on the shell, of the 5 Bourne-like shells that support that <<< zsh operator, NULs would be preserved in zsh, discarded in bash and mksh and everything past the first NUL would be lost in ksh93 and yash. And in any of those shells, the trailing newlines would be lost and one would be added back by <<<. Also note that <<< is implemented with a temporary files in most. So in addition to being stored in memory, the data would also be written on the filesystem. | |
| Aug 26, 2017 at 12:31 | comment | added | xhienne | @Cyker Answer updated | |
| Aug 26, 2017 at 12:20 | history | edited | xhienne | CC BY-SA 3.0 | Added answers to questions |
| Aug 26, 2017 at 7:42 | comment | added | Kusalananda♦ | @Cyker No, null bytes would be discarded from the result. | |
| Aug 26, 2017 at 7:20 | comment | added | Cyker | Plus, can we chain the same variable repeatedly so that we can have more commands in the pipe? | |
| Aug 26, 2017 at 7:19 | comment | added | Cyker | Does this variable method work well with binary data? Do we need base64 or something else to prevent data corruption? | |
| Aug 24, 2017 at 8:28 | history | edited | xhienne | CC BY-SA 3.0 | added 586 characters in body |
| Aug 23, 2017 at 23:55 | history | answered | xhienne | CC BY-SA 3.0 |