how do I highlight every occurrence of a word, Linux? I have tried to show the contents of my file but I don't know how to highlight specific words! please help!!
52623
Say I have the following file:  $ cat test  test line 1 test line 2 line without the search word another line without it test line 3 with two test words test line 4   By default, grep returns each line that contains the search term:  $ grep test test  test line 1 test line 2 test line 3 with two test words test line 4   Passing the --color parameter to grep will make it highlight the portion of the line that matches the search expression, but it still only returns lines that contain the expression. Is there a way to get grep to output every line in the source file, but highlight the matches?  My current terrible hack to accomplish this (at least on files that don't have 10000+ consecutive lines with no matches) is:  $ grep -B 9999 -A 9999 test test     If grep can't accomplish this, is there another command-line tool that offers the same functionality? I've fiddled with , but it doesn't seem to have an option for it either.
5046
Is it possible and furthermore constructive to make LaTeX automatically format specific words in specific way? Let's say, for example, I'd like to have every occurrence of the word "hello" in a bold cyan monospaced font, whereas the rest of the document remains normal, sans serif and black.   How can I achieve that without having to do a search&amp;replace to place "hello" into a custom command every time before I compile the .tex file?
41899
I'd like to be able to do the following in the search box:  shell [cmd] [-linux]   to search for "questions containing the 'shell' term AND having the 'cmd' tag AND NOT having the 'linux' tag"  Note that "shell" is not a TAG !
63991
I was able to do a tail -f output with colors using the awk command. But I'm unsure how to output the rest of the log as it seems to be filtering only those 2 lines. I also want to see the other lines as the log is written.  What do I need to put in the awk command to show the rest of the output?  Image of my issue. The red text above is without using awk and displays the entire tail -f log. And below that is the same command with the awk color filtering.
80039
Is it possible to tag sections of your .tex file so that you can make text appear or not?  I have a long document and would like to be able to comment a certain section in each chapter, and produce two different pdfs, one with the comments, and one without.  I read . Is it possible to make this appear if I redefined the comment tag? How is this done?  (On suggestion, migrated this question from StackOverflow: )
8329
In order to revise a draft, and identify related sections, I would like to identify similar words (by color of text, highlight, underline, or otherwise) according to topic.   For example, I would like all uses of the terms "foo" or "bar" highlighted red and all uses of "biz" and "baz" highlighted green.  There might be four or five groups of words or word roots that I want to specify. This is only for revision, so it can be rather crude.  For example, replace this:    with this:    (In the example, it is hard to see the green text; perhaps bold+color or underline would be more useful)  Update A  provides an answer using XeLaTex. My document does not compile with XeLaTex, I would prefer a solution compatible with pdflatex if available (since that is what I use), though my document also compiles with luatex.  Other related questions:    (answer is not generic - requires seven lines per string to be replaced)  (only provides xelatex solution)   (uses chickenize, replaces string but does not add color)
57883
I've just come across the &lt;&lt; command, used like so:  cat &gt; outfile.txt &lt;&lt;EOF Multi-line content that will be written to outfile.txt EOF   Now, I've no idea what this is called, but I'd quite like to know it's name, primarily so I can go and search and find out more about its syntax. Sadly, Googling for "&lt;&lt;" just doesn't work.
116925
How can I search for bolded or underlined text? This would often be useful to search for keywords, which are often highlighted as such. For example, in this excerpt from bash(1):    I might want to search for read or timeout, but searching for only that will give me dozens of useless results which I will have to n past. There are some "tricks" you can use to reduce this (e.g. searching for &lt;Space&gt;read&lt;Space&gt; or read \[), but that doesn't always work for every manpage or keyword.  Note that I'm not particularly attached to less as such; using a different pager is fine. less just happens to be the default pager.
27241
How do I list all .txt files with their full path that have a word 'Ubuntu' in them. Ignore non-text files. When comparing values you should ignore the case i.e. UBUNTU or ubuNtu or UbUnTu are treated as equal to the search phrase given.
73683
Short question:  Using bash, is it possible to print a sentence such that each individual word has a different color?   I.e; print a word in-line, change the text color, repeat?
44258
I am looking for a way to add some string to the beginning of every line (same string for every line). Not something customizable but rather something that will be easy to remember and available on every POSIX-compliant platform (and every shell as well).
36976
I like  under Windows. I was wondering if there are some similar ones for Ubuntu? Or just the powerful and convenient one in your opinion.  Features that I like are:   syntax highlighting for language X theme support line numbering code folding regex style Powerful, yet not resource-consuming
3334
I am writing a batch file script using Windows command-line environment and want to change each occurrence of some text in a file (ex. "FOO") with another (ex. "BAR"). What is the simplest way to do that? Any built in functions?
40363
I'm trying to replace each , in the current file by a new line:  :%s/,/\n/g    But it inserts what looks like a ^@ instead of an actual newline. The file is not in DOS mode or anything.  What should I do?  If you are curious, like me, check the question  as well.
2420
What do the different colours in Ubuntu's ls command mean? For example, when I type the ls command in one of my folders, I get one of the files in light green, the other (which is a folder) in blue with green highlighting.   What do those colours mean, and there is any manual about all the colours?
42775
I had a command which would work through a text file, count all the occurrences of the words and print it out like this:  user@box $˜ magic-command-i-forgot | with grep | and awk | sort ./textfile.txt 66: the 54: and 32: I 16: unix 12: bash 5:  internet 3:  sh 1: GNU/Linux   So it does not search line-by-line, but word by word, and it does it for all the words, not just for 1 word. I'd found it somewhere on the internets a long time ago, but I cannot find or remember it..
59746
I am looking for an open source (possibly 64 bit) windows text editor that will allow me to remove duplicate lines from an extremely large (4GB+) text file.  What do you use to remove duplicate lines from your large text files?