LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-05-2005, 10:43 AM   #1
markjuggles
Member
 
Registered: Nov 2003
Location: Chicago western suburbs
Distribution: Linux Mint
Posts: 75

Rep: Reputation: 15
Regular Expressions


Hi,

I would like to grep a source file for all 'malloc' and 'free' calls at the same time to track down a memory leak.

What is the best way to do this? I'm very rusty with Perl

Thanks,

Mark
 
Old 05-05-2005, 12:24 PM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,793

Rep: Reputation: 496Reputation: 496Reputation: 496Reputation: 496Reputation: 496
Code:
egrep "(malloc|free)" source.c
 
Old 05-05-2005, 12:39 PM   #3
markjuggles
Member
 
Registered: Nov 2003
Location: Chicago western suburbs
Distribution: Linux Mint
Posts: 75

Original Poster
Rep: Reputation: 15
Perfect!

Thank you
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Perl and Regular Expressions Fonk Programming 1 06-27-2004 12:32 PM
Regular Expressions overbored Linux - Software 3 06-24-2004 03:34 PM
help with REGULAR EXPRESSIONS ner Linux - General 23 11-01-2003 12:09 AM
Regular expressions aromes Linux - General 1 10-15-2003 01:29 PM
regular expressions? alaios Linux - General 2 06-11-2003 04:51 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration