On Wed, May 22, 2024 at 12:32 AM Zachary Santer <zsan...@gmail.com> wrote: > > In my Rocky Linux 9.1 VM: > $ bash --version > GNU bash, version 5.1.8(1)-release [...] > $ exec {fd_A}> >( cat > file_A.txt ) > $ exec {fd_B}> >( cat > file_B.txt ) > $ printf 'words\n' | tee /dev/fd/"${fd_A}" /dev/fd/"${fd_B}" > words > $ exec {fd_A}>&- {fd_B}>&- > $ cat file_A.txt > words > $ cat file_B.txt > words > $ exec {fd_A}> >( tr 'w' 'W' > file_A.txt ) > $ exec {fd_B}> >( tr 'w' 'W' > file_B.txt ) > $ exec {fd_A}>&- {fd_B}>&- > $ cat file_A.txt > $ cat file_B.txt > $
Yes, I missed a line there, several times actually, and then pasted that here. $ exec {fd_A}> >( cat > file_A.txt ) $ exec {fd_B}> >( cat > file_B.txt ) $ printf 'words\n' | tee /dev/fd/"${fd_A}" /dev/fd/"${fd_B}" words $ exec {fd_A}>&- {fd_B}>&- $ cat file_A.txt words $ cat file_B.txt words $ exec {fd_A}> >( tr 'w' 'W' > file_A.txt ) $ exec {fd_B}> >( tr 'w' 'W' > file_B.txt ) $ printf 'words\n' | tee /dev/fd/"${fd_A}" /dev/fd/"${fd_B}" words $ exec {fd_A}>&- {fd_B}>&- $ cat file_A.txt Words $ cat file_B.txt Words I should really sit on these emails more often.