Each time I've been looking for "something I don't know exactly what" in big text file, e.g. log-file, huge shell script, I wish to hide all the lines of certain types.
I wish to select certain lines with a set of regexps and either hide them or highlight.
It would be nice if I could select line blocks e.g. those lines between "function ...() {" and corresponding "}"
can you suggest me such a viewer?
egrep
although it has to be used from the terminal. Assuming you are in the directory that holds the file calledinput
,egrep -v '^#|^ *$' input > output
will exclude lines that are commented with a#
at the beginning of lines and lines that are not blank and write the results to the file calledoutput
in the same folder. Obviously, you can modify the criteria depending on the content of your file.