FDSWAP(1)
π 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:
emptyenv(1)envfile(1)exec(1)execline-cd(1)execline-umask(1)exit(1)export(1)fdblock(1)fdclose(1)fdmove(1)fdreserve(1)getcwd(1)getpid(1)heredoc(1)piperw(1)posix-cd(1)posix-umask(1)redirfd(1)trap(1)tryexec(1)unexport(1)wait(1)withstdinas(1)exec(3)
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
- nixpkgs unstable: execline 2.9.9.2
- nixpkgs unstable: execline-man-pages 2.9.9.1.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms