I want to parse some output so I exclude all lines that contain either foo or bar, as well as all lines immediately preceding those lines. For example: echo " 1 some line 2 line to exclude because ...
How do I search in a textfile with grep for the occurrence of a word or another word? I want to filter the apache log file for all lines including "bot" or "spider" cat ...
If I have a directory full of files and sub directories. What is the best way to list just the regular files which fall alphabetically before a given string? Currently the best I can do using bash is ...
I have a file in this format: [#] OWNER_NAME NAME SIZE  Robottinosino Software 200  Robottinosino Ideas worth zero 188  ...
I'm looking for the simplest method to print the longest line in a file. I did some googling and surprisingly couldn't seem to find an answer. I frequently print the length of the longest line in a ...