I want to set up an analysis to find a line in a file and display the value. I have set up my AIX servers to output a command to a text file (tmp/output.txt) and want to find “Entitled Capacity” and display the value. Here is a sample of the file;
Partition Number : 19
Type : Shared-SMT-4
Mode : Capped
Entitled Capacity : 1.00
Partition Group-ID : 32787
Shared Pool ID : 0
I want to display the 1.00 or whatever the value may be.
Something like following texts of firsts ":" of lines whose (it as string as lowercase contains "entitled capacity :") of files "output.txt" of folders "/tmp"
This should in theory return only the text after the colon for a leaner property. You might have to tweak the file and folder pieces as I don’t do a lot of work on the *ux side, but all of the above inspectors are supported on AIX, Red Hat, Debian, and so on.