Predictive Hacks

How to Search for a String within Documents in Unix/Linux

Let’s see how we can get all documents that contain the word pandas somewhere in a directory under the current directory. We can use the grep command as follows:

grep -r pandas *

Now, if we want to search for a word, let’s say “pandas” within a particular file (““) we can run the command:

$ grep pandas 

If we want to search for any words but “pandas” we can run:

$ grep -v pandas 

Share This Post

Share on facebook
Share on linkedin
Share on twitter
Share on email

Subscribe To Our Newsletter

Get updates and learn from the best

More To Explore


Image Captioning with HuggingFace

Image captioning with AI is a fascinating application of artificial intelligence (AI) that involves generating textual descriptions for images automatically.


Intro to Chatbots with HuggingFace

In this tutorial, we will show you how to use the Transformers library from HuggingFace to build chatbot pipelines. Let’s