val=$(curl https://www.geeksforgeeks.org | tr '\n' ' ' | tr -s [[:space::]] | grep -E client_id -e publication_id)
I have a requirement to fetch the particular value from curl command:
Sample I/P:
client_id:"15647",publication_id:["151","152","153"]
Output:
publication_id:["151,"152","153"]
I want to use grep command to fetch publication_id values from curl command in unix and store in variable