Home > OS >  How would I be able to delete certain parts of stdout before displaying
How would I be able to delete certain parts of stdout before displaying

Time:02-04

I have this little cli one-liner that I made which displays corporate BS that one typically hears in the workplace. It is called corporate-bs. The one-liner is as follows -

links -dump https://corporatebs-generator.sameerkumar.website

Here is a sample output -

{"phrase":"Collaboratively Leverage Other's Corporate Collaboration And Idea-sharing"}

Is there any way that I can get rid of the word phrase, the brackets({}), and the quotation marks before it gets displayed. I would like for it to simply display like this -

Collaboratively Leverage Other's Corporate Collaboration And Idea-sharing

If anyone could help me out with this, I'd greatly appreciate it.

CodePudding user response:

That looks like JSON. Use jq

links -dump whatever | jq -r .phrase
  • Related