473,399 Members | 3,919 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,399 software developers and data experts.

Query regarding grep!!



Hi,

I saw in PEP4 of python 2.5 that grep module has gone
obsolete in perl 2.5. But I am not able to find an
alternative for that.My doubt is "are the other forms
of grep like egrep and ggrep be used instead"?

cheers,
Spurthi


__________________________________________________ ________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/
Sep 26 '06 #1
1 1306
Of course you can always use grep as an external process (if the OS has
it). For example:

-------------------------------------------------------------------
In [1]: import subprocess

In [2]: out=subprocess.Popen( 'grep -i blah ./tmp/*',
stdout=subprocess.PIPE, shell=True ).communicate()[0]

In [3]: out
Out[3]: './tmp/ex.tex:Blah blah blah...\n'
-------------------------------------------------------------------

-Nick V.

bhavya sg wrote:
Hi,

I saw in PEP4 of python 2.5 that grep module has gone
obsolete in perl 2.5. But I am not able to find an
alternative for that.My doubt is "are the other forms
of grep like egrep and ggrep be used instead"?

cheers,
Spurthi


__________________________________________________ ________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/
Sep 26 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: amiya | last post by:
select last_name,hire_date,to_char(hire_date,'DAY') DAY from employees order by to_char(hire_date-1,'d') i wanted to know how the function to_char(hire_date-1,'d') works... its basically a...
1
by: Divya Alice George | last post by:
Dear Sir, My problem is that i am required to validate a given schema against the standard DTDs provided by w3.org- namely xmlschema.dtd and datatypes.dtd. Presently, I load the given schema into...
3
by: Tejas | last post by:
Hi, I have gone through the snapshot API. I need to use it for finding location of database files, tablespace containers etc on a remote machine. These parameters are present in the response....
15
by: rAinDeEr | last post by:
Suppose i have a table which holds thousands of records with the following structure CREATE TABLE "test "."T_CNTRY" ( "CNTRY_CDE" CHAR(2) NOT NULL , "CNTRY_NAME" VARCHAR(50) ) and i have...
9
by: sam_cit | last post by:
Hi everyone, I have the following piece of code, #include <stdio.h> #include "sample1.h" int x = 10; namespace first
1
by: Pradeep83 | last post by:
Hi All Problem : I am unable to retrieve the data from the table in postgres database using C application which i have written in solaris os. Query: How to check whether connection is there...
6
by: nishant4nishu | last post by:
Hi....I have to get device information(Like its name and location) using SNMP in c++ environment...I m new to C++ and networking domain...Plz can anybody send me some sample codes in C++ regarding...
3
by: MyMarlboro | last post by:
print Dumper(@data); _____________ $VAR1= '2008,Car,Medium1,5000'; $VAR2= '2008,Car,Medium2,5000'; $VAR3= '2007,Plane1,Medium1,20000'; $VAR4= '2006,Boat,Small1,20000'; $VAR5=...
13
by: prasadmpatil | last post by:
I am new STL programming. I have a query regarding vectors. If I am iterating over a vector using a iterator, but do some operations that modify the size of the vector. Will the iterator recognize...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.