A few questions to think about...
Is this a strict format for these records (ie. field position)?
Is there an identifier unique to these records (eg name of the logging method)?
Are those real phone numbers and should you anonymise them?
Take a look at the cut and grep commands and see if they could meet your needs.
hi peasant!
i've actually have tried a number of commands but the result is not that desirable.
i've tried this grep -woE '[A-Z]{2,}|[0-9]+-[0-9]{2}-[0-9]{2} [0-9]+:[0-9]{2}' sys.log. however it gives me this format:
USER1
ACTIVE
2020-06-01
14:31
USER2
ACTIVE
2020-06-01
14:31
i've also tried this
sed -n '/^[A-Z][A-Z]* /p' sys.log
and it displays everything on the log file.
im sorry but i just couldn't figure out how to get the correct format like this