Linux : Run commands consecutively and grep output of all of them

Simply enclose the commands you want to grep in parentheses.

Examples :
> (./task1.sh && ./task2.sh) | grep "fail"
> (./task1.sh ; ./task2.sh) | grep "error"

Comments

Popular posts from this blog

Resolve "Cannot download packages whilst offline" issue in Deja-Dup backup software

ubuntu 20.04 / netplan / change mac address and static ip

wireshark ssh remote connect on linux server