Complete the code to use process substitution to compare the contents of two files.
diff <([1] file1.txt) <(cat file2.txt)ls which list files instead of reading contents.echo which does not read file contents.The cat command reads the contents of file1.txt and provides it as input via process substitution.
Complete the code to redirect the output of a command to a file using process substitution.
tee >( [1] > output.log ) < input.txtls which lists directory contents instead of writing output.echo which does not read from input.The cat command reads from the process substitution and writes to output.log.
Fix the error in the code to correctly use process substitution to sort and compare two files.
diff <(sort [1]) <(sort file2.txt)-r without a filename.The command sorts file1.txt and file2.txt before comparing them with diff.
Fill both blanks to create a command that compares the output of two commands using process substitution.
diff <([1]) <([2])
This command compares the list of running processes with the detailed list of files in the current directory.
Fill all three blanks to create a pipeline that writes the output of a command to a file and also processes it.
command | tee >( [1] ) | [2] | [3]
The pipeline writes the command output to output.txt, filters lines containing 'error', then counts those lines.