2
votes
3answers
106 views

Search and print the lines from the output which can contain lines with errors

I have a command example, device list which gives me all devices with their status as okay or error in the following format [okay ]: you are listening on : 11 [error ]: not currently ...
1
vote
2answers
1k views

How to use text extracted from the “grep” command as an argument in a bash script?

I have a file called "krylov_methods", which has text like this: cg - preconditioned cgne - normal equations nash - cg subject to constraint stcg - another method for constraints gmres - ...