[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: "here strings" and tmpfiles
From: |
Greg Wooledge |
Subject: |
Re: "here strings" and tmpfiles |
Date: |
Wed, 20 Mar 2019 08:19:13 -0400 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Wed, Mar 20, 2019 at 07:49:34AM +0700, Robert Elz wrote:
> 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).
Meanwhile, proposals based around /dev/fd/* would also make here docs
unusable in a shell running early in the boot process, before all
file systems are mounted.
Just like that one time L. Walsh tried to write a bash boot script that
used <() to populate an array, and it failed because she was running
it too early in the boot sequence, and /dev/fd/ wasn't available yet.
So, my counterpoints are:
1) Leave it alone. It's fine.
2) Don't use bash for scripts that run early in the boot sequence.
3) Whatever features you *do* use in boot scripts, make sure they're
available at the point in the boot sequence when the script runs.
4) Whatever features you use in scripts *in general*, make sure you
understand how they work.
Even if Chet changed how here docs work in bash 5.1, nobody would
be safe to use those features in their "I'm feeding a password with
a here string" scripts for at least 20 years, because there will
still be people running older versions of bash for at least that long.
Thus, leave it alone.
Re: "here strings" and tmpfiles, Daniel Kahn Gillmor, 2019/03/19
Re: "here strings" and tmpfiles, Robert Elz, 2019/03/19
- Re: "here strings" and tmpfiles,
Greg Wooledge <=
Re: "here strings" and tmpfiles, Chet Ramey, 2019/03/22
Re: "here strings" and tmpfiles, Chet Ramey, 2019/03/22