Outdoor Technologist

Random thoughts spewed in the digital realm

Parse files with grep and cut – wait cut??

I had a few log files with microsecond timers that I needed to parse quickly and I figured I could do it with grep, but then I found out I could do it even more efficiently by piping to ‘cut’

I learned this here:

https://unix.stackexchange.com/a/548716/438718

Example:

grep 'mmTimer' filename | cut -b 17-24
command linelinuxlogManipulation

John • 2021-07-28


Previous Post

Next Post