3 ms·
I had someone ask me (a self described grep monkey) how I navigate grepping very long lines (minified js for example) to which I replied ‘lol I just ignore them
by hsbauauvhabzb 4y ago
I had someone ask me (a self described grep monkey) how I navigate grepping very long lines (minified js for example) to which I replied ‘lol I just ignore them’. I’d love ‘only select 200 chars if longer than 200 chats, but to my knowledge there’s no easy way to do this with grep. I’d love to hear suggestions on how people navigate this
- burntsushi 4y agoripgrep has the -M option that will help here.
- karottenreibe 4y agoMy go-to is using -o and pre/appending .{100} to the pattern to capture however much context I need
- paulryanrogers 4y agoPipe to cut -c 1-200?