I'm trying to parse a line within a file that contains "ID" and a numeric entry. However, what the script below is doing is grabbing the "ID" numeric value plus everything after it. How can I just cut it down to "ID" + numeric value and nothing else?
Thanks in advance.
tail -n 1 events.log | sed 's/.*id=\([^)]\+\).*/\1/' > event_id.dat