I have an input file with data below. I would like to grep and display the data where 3rd column contains string or at least one character. Kindly please help me with this!
Note that <space>s and <tab>s are characters. So, according to your requirements, the output should be an exact copy of your input.
Assuming that you are looking for a 3rd field that contains at least one character that is not a whitespace character, this could be done with grep or sed , could be done a little bit easier with grep -E , and could be done still easier with awk .
Please clarify your requirements (and, as requested by Franklin52) show us what you have tried and tell us where it is falling short of your goal (using CODE tags to display your code and the output you're getting from it).
And, please explain whether "grep" in "I would like to grep" is an explicit requirement to use the grep utility or a verb indicating that you want to perform a generic global regular expression search and print matching lines.
I would like to filter all lines, which contains at least one visible character in the third column. Hopefully, it is clear now. I would appreciate for any solution with grep or awk.