I know that there are ten different alternatives. Why don’t we simply improve the basic stuff?

  • bizdelnick
    link
    fedilink
    arrow-up
    5
    ·
    8 months ago
    touch a b c 'd e f' 'g h i'
    for f in *; do ls -la "$f"; done
    

    fxd

    • GenderNeutralBro@lemmy.sdf.org
      link
      fedilink
      English
      arrow-up
      6
      ·
      8 months ago

      That will work in either zsh or bash, yes. It’s a good habit to use quotes, but I am pointing out that quoting and expansion behavior is not the same across all shells.

      • bizdelnick
        link
        fedilink
        arrow-up
        7
        arrow-down
        1
        ·
        8 months ago

        It’s the same across all POSIX compliant shells. zsh is not POSIX compliant.