This is part of the Semicolon&Sons Code Diary - consisting of lessons learned on the job. You're in the unix category.
Last Updated: 2024-11-23
I had this output from syslog, but I wanted to extract from diskarbitrationd
onwards
2020-01-16 12:01:41.991874+0100 0x2a3 Default 0x0 78 0 diskarbitrationd: [com.apple.DiskArbitration.diskarbitrationd:default] <private>
I tried cut
with a space delimiter
cut -d " " -f 8
It did not extract the expected data.
The issue is that cut
doesn't handle long spans of spaces easily. awk
is really what I want:
awk '{ print $8, $9 }'