FDSWAP(1)

πŸ“¦ version 2.9.9.2, in nixpkgs unstable

πŸ’– FDSWAP(1) πŸ’–

okay so bestie, welcome to the General Commands Manual corner of the group chat. today’s main character is fdswap, and her whole thing is literally: swap two file descriptors, then execute a program. no cap. πŸ‘‘


✨ NAME ✨

fdswap β€” swap two file descriptors, then execute a program πŸ’…

πŸ“œ SYNOPSIS πŸ“œ

fdswap fd1 fd2 prog...

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here’s the tea: fdswap swaps the file descriptors numbered fd1 and fd2, and then it exec(3)s into prog with its arguments. that’s the move. 🫢

so like, you hand it two fd numbers, it swaps them, then it becomes prog and passes along its arguments. very β€œtrade seats and then leave the party” energy, ngl. ✨

⚠️ bestie, important: fdswap has no portable shell equivalent. like, fr fr, you can’t just recreate this portably in shell and pretend it’s the same vibe. πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group is here, iykyk:

this man page is ported from the authoritative documentation at: https://skarnet.org/software/execline/fdswap.html 🌈

πŸŽ€ AUTHORS πŸŽ€

credit where credit is due, bestie:

  • Laurent Bercot
  • Alexis <flexibeast@gmail.com> (man page port)

mwah πŸ’‹ β€” source/version Debian, dated February 14, 2021, page FDSWAP(1), and that’s the whole footer vibe check. πŸ«ΆπŸŽ€

πŸ“¦ where this page comes from