Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • When I use this command on the terminal, there is no output(no text at all on the terminal). However doing wc -l on the output gives the output 539. Then I tried to redirect the output of this command (grep command that you mentioned) to some text file, I got the results. Why was there nothing to display on the terminal? Also, when I redirected the output to a file, I got getting some lines with empty second column. Commented Feb 8, 2016 at 7:59
  • @Snowbell check the second one.. Commented Feb 8, 2016 at 8:06
  • grep '^[^[:blank:]]\+[[:blank:]]\+[^[:blank:]]\+$' file.txt. This command is behaving in the same manner as the first one(no output at terminal; output is displayed only when command output is redirected to some file). Moreover, this command produces a files with (116) lines only. Also, there were only few lines with second column that was not empty. Commented Feb 8, 2016 at 8:10
  • @Snowbell Please edit your question to add some example text so that we can verify this.. Commented Feb 8, 2016 at 8:14
  • I have added two samples of my input file and the corresponding output that I received... Commented Feb 8, 2016 at 9:24