473,396 Members | 1,859 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to Identify files with sed command contained in text

Hi

My home directory contains lots of files with differing contents and extensions.
I wish to identify all those files containing a sed command in the text.
I thought I could use something like
Expand|Select|Wrap|Line Numbers
  1.           find . –print | grep “ sed “
  2.  
,

but this seems to look for files with “ sed “ in the filename, not in the contents.

Can anyone help ?
Dec 14 '10 #1
2 1973
ashitpro
542 Expert 512MB
you can use,

grep -rin "sed" *

This will do a recursive search for pattern "sed" in each file.
Dec 17 '10 #2
Thanks Ashitpro : your solution works great for me.
Dec 17 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

17
by: Guyon Morée | last post by:
what is the difference? if I open a text file in binary (rb) mode, it doesn't matter... the read() output is the same.
4
by: Uwe Ziegenhagen | last post by:
Hello, my fellows and me implement a c++ tool that is able to divide blank/tab separated files into <number>, <text>, <c-singlelinecomment> and <multilinecomment>. So far it's not working bad,...
1
by: BARTKO, Zoltan | last post by:
Hello folks, I have the following problem: I have a bunch of text files, I want to load them into a table where each file will be stored in one row. Question 1: Is there any way how to do...
2
by: Joolz | last post by:
Hello everyone, Sorry if this is a FAQ, but I've groups.googled the subject and can't find a definite answer (if such a thing exists). I'm working on a db in postgresql on a debian stable...
21
by: Nicholas Sherlock | last post by:
Hey all, People on my website register to be allowed access to certain downloads. I store these files above the document root so that they can't be accessed by Apache (Only from PHP). I wrote a...
12
by: Antonio Maschio | last post by:
Hi, I need help. I want to read text files contained into a directory, but my program is unaware of how many files are contained into. In bash there's something similar to (figure out) for i...
0
by: Ludwig Stockmann | last post by:
Hi, everybody: I am really new to vb.net, and I need to know if there is any way to input parameters from a Textbox in a 100% vb.net form to a batch file. I have created 3 text...
0
by: hash4sp | last post by:
I have just started my career in programming. My Problem is reading a text file using VB.NET. The text contains the state names followed by respective city names. My task is to read the file and...
0
by: wankhusairi | last post by:
hello for your imformation im using Vb6 and having difficulties on loading a file and then displayed the file. for your information i uses a combox,listview ,directory view and also command buttons...
1
by: =?utf-8?q?C=C3=A9dric_Lucantis?= | last post by:
Le Wednesday 02 July 2008 01:16:30 Ben Keshet, vous avez écrit : If the file you're reading is not too big, you can use file.readlines() which read all the files and returns its content as a...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.