I'm trying to process large error logs and part of that is filtering out lines I don't need to see. Here's what I'm running in vim:
:g/.*rsync: stat.*/d | %s/\(.*mkstemp "\)\(.* \/\)\(.*$\)/\2/ | g/[ERROR]/d | sort u
Now, when I run these commands one-by-one, they work fine. The third global command - [ERROR]
, seems to have some issue and running it in conjunction with the second or fourth command doesn't have the expected outcome. When I chain it with the second command I get E147: Cannot do :global recursive
, and when I chain it with sort u
, the sort command doesn't seem to run.
When I run the global command on its own, and then run the sort command, everything works out.
What am I missing here?
EDIT: I have tried surrounding [ERROR] in double-quotes; no change.