I try to replace a certain substring from the stdin with a new substring. I have to get the stdin from the pipe, after reading several files by cat. Then I want to
cat
You can use the command sed.
cat file1 file2 | sed -e 's/@path_to_file/path/to/file/' ...
With Parameter Expansion:
cat file1 file2 | while read -r line; do echo "${line/@path_to_file/path\/to\/file}"; done