Print everything from the 2nd to 5th item on the line, excluding the 5th

choose

  • A human-friendly and fast alternative to cut and (sometimes) awk.
    More information: <https://github.com/theryangeary/choose>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

choose --exclusive {{1}}:{{4}}

click the source code to copy install choose on any operating system with command-not-found.com