draft0 - a shared blog by just some people

Menu

Entries tagged 'cat:Output Redirection'

Bash Tip

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.

Comment via email
Mastodon