Skip to content

fix IFS in iteration / array create where path names could have spaces #132

@earthbound19

Description

@earthbound19

Some .sh scripts may have IFS reassignments that miss multiple spaces in directories, and which concatenate them to one. ftun.sh had this. To fix that, do IFS reassignment and revert like this:

OIFS="$IFS"
IFS=$""
  paths=($(find . -type d))
IFS="$OIFS"

Check all scripts for and fix this if needed.

NOTE: I'm not sure what $"" does and need to look it up / test it. In many scripts I have the reassignment as IFS=$'\n' and need to look up what that does also. Copy/pasted code :|

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions