I am trying to suppress some output from a command in bash, this is different to suppressing all output, because most of the output is useful, apart from a few lines that repeat hundreds of times which I would like to ignore.
Use-case: I have a CI server, at some point during the build, I am publishing a dotnet lambda function:
dotnet lambda package {...}
Most log output is useful, apart from a couple of logger calls from here and there. There is no way to suppress those via command-line switches to the command itself, which makes my build log much larger than I would like it to be:
48.67 ... publish: FooBar.Client -> {...}/FooBar.Client.dll <<< Useful
49.29 ... publish: FooBar -> {...}/bootstrap.dll
49.71 ... publish: FooBar -> {...}/publish/
49.73 Changed permissions on published file (chmod +rx appsettings.json). <<< Meh
[Repeated many times for other files]
#12 49.91 ... zipping: adding: appsettings.json (deflated 29%) <<< Meh
[Repeated many times for other files]
I would like to suppress output to standard out only if the line contains Changed permissions on published file
or zipping
. How do I do it?