Bash: replacing a substring in pipe stdin

后端 未结 2 1017
醉话见心
醉话见心 2021-02-07 12:54

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

2条回答
  •  情深已故
    2021-02-07 13:38

    You can use the command sed.

    cat file1 file2 | sed -e 's/@path_to_file/path/to/file/' ...
    

提交回复
热议问题