Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • I realized that there is not tag for "serialization" yet ;-) Also please explain the effect of setting an empty delimiter for readarray. Commented Nov 25, 2022 at 8:21
  • @U.Windl, see info bash readarray which points to its misnomer equivalent: info bash mapfile. Commented Nov 25, 2022 at 8:27
  • The info from info is basically the same as in the BASH manual page, but still it does not really explain the effect of an empty delimiter. I could guess that an empty string is represented as a binary zero internally, but maybe some day the argument checker might complain that the argument to -d cannot be empty... Commented Nov 25, 2022 at 8:33
  • 1
    @U.Windl, maybe the older versions of the manual were not as clear, but the current version doesn't leave any doubt as to what -d with an empty string does. Note that info bash is the manual same as the one you get in man, though using man for a manual this size is not really appropriate IMO. Commented Nov 25, 2022 at 9:02
  • 1
    This seems very strained as an example of serialization, unless you are thinking of a command-line command as some kind of "object". It looks a lot more like ordinary string escaping. Commented Nov 25, 2022 at 9:52