On Wed, Mar 20, 2019 at 9:05 AM Robert Elz <k...@munnari.oz.au> wrote: > Note: I am not suggesting bash should change - using files for here docs > is the way they were originally implemented (in the Bourne sh) (though it > had bugs, which could leave the files lying around in some cases). > > However, using files for here docs makes here docs unusable in a shell > running in single user mode with no writable filesystems (whatever is > mounted is read only, until after file system checks are finished).
Here docs and here strings are rarely used in pre-rw boot scripts, and in my opinion should be avoided, but if it's necessary, an initramfs should be used. Some users can also mount /tmp as tmpfs earlier if they know what they are doing. Perhaps bash can also look at /dev/shm. It's a common tmpfs, but I haven't checked if it's standard and what utility mounts it. I don't really use it. Again to be clear, I'm against here * being used or viewed as seekable files. -- konsolebox