Output Redirection

0
comando | tee -a saida.txt

How do I redirect only part of the output of a command?

    
asked by anonymous 26.04.2018 / 20:25

1 answer

0

Depending on the output of the executed command you can use grep (or one of its variants, egrep or% with%). For example:

comando | grep batata | tee -a saida.txt

In the previous example, only rows that contain the word potato are passed to fgrep .

Depending on the filter (if you need something more sophisticated), you can use tee or awk .

    
26.04.2018 / 22:13