LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-19-2001, 02:23 PM   #1
Griffon26
Member
 
Registered: Sep 2001
Location: The Netherlands
Distribution: Gentoo, Debian, Mandrake, LFS
Posts: 182

Rep: Reputation: 30
Question Replacing "function(x)" with "x" using sed/awk/smth


Subject says it all.





I can find the matches with the regular expression "function(.*)", but how do I grab the .* part of the match and send it to the output? So far I've only been able to use the entire match (not very useful if you want to remove instead of add something).

Last edited by Griffon26; 10-19-2001 at 04:44 PM.
 
Old 11-22-2006, 10:04 AM   #2
zefo
Member
 
Registered: Mar 2003
Posts: 71

Rep: Reputation: 15
how about this? echo "function(x)" | sed -e "s/function(\(.*\))/\1/"
 
Old 11-22-2006, 10:31 AM   #3
Griffon26
Member
 
Registered: Sep 2001
Location: The Netherlands
Distribution: Gentoo, Debian, Mandrake, LFS
Posts: 182

Original Poster
Rep: Reputation: 30
I appreciate your effort, but it's been 6 years.
In the mean time I've learned a thing or two about linux, so I could've answered my own question ;-)
 
Old 11-22-2006, 10:47 AM   #4
zefo
Member
 
Registered: Mar 2003
Posts: 71

Rep: Reputation: 15
that's allright. i am only practicing script making today.. :-)
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Telling people to use "Google," to "RTFM," or "Use the search feature" Ausar General 77 03-21-2010 11:26 AM
"Xlib: extension "XFree86-DRI" missing on display ":0.0"." zaps Linux - Games 9 05-14-2007 03:07 PM
When "function pointer" meets "template"... I can't get rid of this compiling er cyu021 Linux - Software 3 12-17-2004 07:52 PM
"Function not implemented" error in call to "sem_open()" Krishnendu8 Linux - Newbie 1 06-07-2003 02:52 AM
"Function not imlemented" error in call to "sem_open()" Krishnendu8 Linux - Networking 0 06-07-2003 02:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:51 AM.

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