I need to pipe 2 commands together, the first command replaced XYZ in input file to “,”, then I need to do do another replace. unsuccessfully tried the following.
tr 'XYZ' ',' <input_file | xargs tr ',' ''
what’s the right way to pipe two command together where the second command expects input from a file?
The pipe symbol
|connects the standard output of the first command to the standard input of the 2nd command.tris a filter, that is a program that expects its input to appear on the standard input stream and emits its result on the standard output stream.You can connect as many of these together as you want: