Skip to content

Remove use of ANSI-C Quoting for IFS #16

@dchanm

Description

@dchanm
IFS=$'\t\n'

That doesn't work as expected in POSIX shells because it is a BASH feature [1]. Variable quoting prevented the issue from manifesting. The fix is to use printf

IFS="$(printf '\t\n')"

echo has some implementation-defined behaviors [2]

[1] - https://www.gnu.org/software/bash/manual/html_node/ANSI_002dC-Quoting.html
[2] - http://pubs.opengroup.org/onlinepubs/009695399/utilities/echo.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions