Entries tagged 'cat:File Descriptors'

Bash Tip Entry created on 2022-11-30 author:steeph (343) cat:Bash (30) cat:File Descriptors (1) cat:Output Redirection (1) cat:Software (51) lang:en (243)

In a script, if you open a file descriptor like this: eval exec 3>&1 and redirect output from certain commands to it like this: echo blub >&3 then you can redirect only that certain output to a different file if needed when calling the script. By default all goes to stdout, but when called like this: ./script 3>>file1 >>file2 then you can check the separated output in file1 and the rest of stdout in file2.

Go To Navigation Page
Show/Hide Navigation