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). |
how about this? echo "function(x)" | sed -e "s/function(\(.*\))/\1/"
|
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 ;-) |
that's allright. i am only practicing script making today.. :-)
|
All times are GMT -5. The time now is 07:45 PM. |