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
- Module 2 Expected Output
- Module 2 . What are the expected output?
- Error in module 2
- Errror in module 2
- Unable to pull repository in module 2 of QBox
- 2/4 test cases fails in QBox module 2 submission
- Facing fatal error in module 2
- Merge Conflict in Module 2
- Doubt in milestone 1 of module 2
- Error in Module 2 in assesment
- QBox Module2 Milestone 4
- Kindly fix this ERROR in Module 2
- Task 3 of module 2
- Assessment failed for Module 2
- Merge conflict issue in module 2
- What is this logic checking for in Module 2 milestone 1
- Having Trouble in Module 2 MileStone 2
- /proc/meminfo works on CLI but can’t “cat” it in .sh file, in module 2
- Module 2 milestone1
- Mapping contents using API in module 2
- Module 2 is not unlocked
- Merge conflict in module 2 (metadata.json)file
- Module 2 assessment
- Module 2 milestone 4
- Module 2 - milestone 3
- Milestone 1 module 2
- Module 2 Milestone 3
- Module 2 - Milestone 4
- Module 2 Milestone 1
- What this Code means in module 2 milestone 1
- Module 2 is not unlocking
- Module 2 error can’t convert to int
- Module 2 Milestone no 4
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
-
Try using grep command with different keywords that might be used to filter out the required line of text
-
If there are multiple matches printed, see how to get the required line of text
-
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
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.