0

I have a log that contains records like:

LineFFF 1234567 0002 @2018-06-12T17:02:50 (len:0)  99 OK  : jAFoSSYut2iJLmrk6fdQPL4OMRgd1Ybzb6U9MG1GeWKWqXlYPyfzyMVb9zn3
LineFFF 1234568 0044 @2018-06-12T17:02:57 (len:0)  84 OK  : jAFoDibWjaH4G0AEuA2dLRilreLDVAV0krEzk58ksAsp8yf38mqBzbMMrMOB
LineFFF 1234569 0053 @2018-06-12T17:02:58 (len:0)  11 OK  : jAFoFyaQtjxC3U0Q6CH+EFd0sC5QoJvo9XGLj87vfeapTrb2qZdNhcYUSGr1

Occasionally, the part of the string to the right of the ':' contains some spaces, and I want to grep/sed/awk the log and only return those lines.. I.e. 'grep for a space character from position 69 and return the full line if present'.

Any ideas? Thanks..

1
0

You can grep for a space anywhere after the 68th character from the beginning simply using

grep '^.\{68,\} ' file
1
  • Too easy - thank you.
    – rack201
    Sep 13 '19 at 0:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.