Skip to content
Advertisement

How to extract strings by using awk on multiple text files and summaries to one file

I have 70 input files, file names are as like slurm-22801576.out, slurm-22801573.out, slurm-26801571.out, and so on. I want to extract all desired strings to one file. So I did the following but I was able to do so for one file only. How to do that on multiple files?

JavaScript

But my output file has only one row

JavaScript

Inside each input file, the texts look like this:

JavaScript

The expected output file should look like this:

JavaScript

Advertisement

Answer

You may use this awk:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement