I have a txt file and its content is as follows. I am trying leave only value like 12, rachel.howell@reqres.in and delete brackets, quotation mark, comma, and the key. Could someone help me what I miss or go wrong with my command line? Thank you!
{
"id": 12,
"email": "rachel.howell@reqres.in",
"first_name": "Rachel",
"last_name": "Howell",
"avatar": "https://s3.amazonaws.com/uifaces/faces/twitter/hebertialmeida/128.jpg",
}
Now, the result I can output is that
{
12,
"rachel.howell@reqres.in",
"Rachel",
"Howell",
"https://s3.amazonaws.com/uifaces/faces/twitter/hebertialmeida/128.jpg",
}
What I expected is:
12
rachel.howell@reqres.in
Rachel
Howell
https://s3.amazonaws.com/uifaces/faces/twitter/hebertialmeida/128.jpg
Here is my command:
sed -e 's/[{]//g' | cut -d':' -f '2' test.txt