You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So what happens is that sed doesn't match the pattern that is supposed to extract the id field from the json object, and leaves the entire object intact.
The value that you show contains a space in the id field; if i fix that, it works fine:
$ echo '{"email":"l8TVlbK0@example.com","locale":"en","accent_id":0,"picture":[],"name":"demo","id":"29740ea6-c54a-4a92-8fd5-3f8c5b05cdc3","assets":[]}' | sed 's/.*"id":"\([0-9a-z-]\+\)".*/\1/'
29740ea6-c54a-4a92-8fd5-3f8c5b05cdc3
Are you sure you got this spurious space from the wire backend? If so, I would be very interested in help to reproduce this.
The space in the id is my mistake ^_^ , I tried again. The sed on the Linux server does not need to escape double quotes (\"\"). The sed on the Mac notebook needs to escape double quotes. Most of the production environment is Use the Linux server, so this issue can be closed.
When I execute on mac, the output is:
I can't match the id. After escaping the double quotes (\"\"), I get the expected result:
I think wire is also intended to output result formats like
id, email, password
.The text was updated successfully, but these errors were encountered: