Output format in qbox module 2

I have explored quite a bit but I am still not getting how to format my output for eg if I want to extract 500 from cpuspeed=“500 Mhz” please tell how could I format it with grep

Hi @Vibhu007
Looks like you are facing challenges in the current module.

Below is a link to all the FAQ’s for the current module

Below are a few similar topics raised by other users which you might find usefull

Note - This is a BETA Feature,if you find this helpful, kindly let us know.
Feedback link - https://forms.gle/cmxN5pdTXgnwgC986

Kindly mark this as a solution if this has helped you solve your query

Hi @Vibhu007,

The core idea is that we need to use output of a bash command as input of another ie, series of bash command. See here

  1. Try using grep command with different keywords that might be used to filter out the required line of text

  2. If there are multiple matches printed, see how to get the required line of text

  3. Use regular expression with grep or the awk command to select a particular piece of text from the line fetched

Nb: We can use different flags for grep to print only the text match & not its entire line, only the first match etc

1 Like

Closing this topic as there is no response since last 12 hours. Please feel free to create a new topic and post this question as a reference link in the description of the new topic.