Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Replace all occurrences of strings with parentheses Post 302479593 by ff1969ff1969 on Saturday 11th of December 2010 05:51:49 PM
Old 12-11-2010
Question Replace all occurrences of strings with parentheses

Hi,
I tried to adapt bartus's solution to my problem, without success. I want to replace all the occurences of this:
Quote:
globalFunc(something)
with:
Quote:
something.memberFunc()
, where something can contain an arbitrary number of balanced parens and brakets.
Any ideas ?
Best,

Last edited by Scott; 12-12-2010 at 05:01 AM.. Reason: New thread; added link to other thread
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Parentheses in perl find/replace

I'm trying to use the following command to do a batch find and replace in all commonly named files through a file hierarchy find . -name 'file' |xargs perl -pi -e 's/find/replace/g' which works fine except for a substitution involving parenthesis. As a specific example I'm trying to sub... (3 Replies)
Discussion started by: Jeffish
3 Replies

2. Shell Programming and Scripting

Replace text in parentheses

Hi I would like to replace a comma in parentheses to a semicolon for example. Other commas outside () stay unchanged. How can I do this? aaaa,bbb,ccc,ddd(eee,fff,ggg),hhh,iii to aaaa,bbb,ccc,ddd(eee;fff;ggg),hhh,iii Thanks (5 Replies)
Discussion started by: lalelle
5 Replies

3. Shell Programming and Scripting

Extracting strings surrounded by parentheses and seperate by commas

Excuse the terrible title. I have a text file of 1..n lines, each one containing at least one string between parentheses. Within each string, there is one or more strings separated by commas. I need to extract each string, thus: input file: (THIS,THAT) (THE,OTHER) (THING) (OR,MAYBE)... (6 Replies)
Discussion started by: kpfeif
6 Replies

4. Shell Programming and Scripting

sed replace multiple occurrences on the same line, but not all

Hi there! I am really enjoying working with sed. I am trying to come up with a sed command to replace some occurrences (not all) in the same line, for instance: I have a command which the output will be: 200.300.400.5 0A 0B 0C 01 02 03 being that the last 6 strings are actually one... (7 Replies)
Discussion started by: ppucci
7 Replies

5. UNIX for Dummies Questions & Answers

Print number of occurrences of many different strings

People, I need your help with making a script which will 1. take as an input the number of lines, smth like this: ((RUBROBACTER_1_PE1288 (((SALINISPORA_1_PE1863 SALINISPORA_1_PE1828)100 ((NOCARDIOIDES_2_PE2419 PROPIONIBACTERIUM_1_PE1395)96 ((((((((CORYNEBACTERIUM_1_PE1119... (3 Replies)
Discussion started by: roussine
3 Replies

6. Shell Programming and Scripting

how many occurrences of different strings are there in each FILE.

Hello , I need some help to pull the data from different files, simultaneously for the string provided. I want to search below strings. PTN:3763427632478 IDB:3298734287438 PTN:8734983298738 From the files BELOW CODE_FILE_LOG1 CODE_FILE_LOG2 CODE_FILE_LOG3 CODE_FILE_LOG4 (3 Replies)
Discussion started by: baraghun
3 Replies

7. Shell Programming and Scripting

awk and gsub - how to replace only the first X occurrences

I have a text (text.txt) and I would like to replace only the first 2 occurrences of a word (but I might need to replace more): For example, if text is this: CAR sweet head hat red yellow CAR book brown tiger CAR cow CAR CAR milk I would like to replace the word "CAR" with word... (12 Replies)
Discussion started by: bingel
12 Replies

8. Shell Programming and Scripting

PERL : Sort substring occurrences in array of strings

Hi, My developer is on vacation and I am not sure if there is something which is easier for this. I have an array of strings. Each string in the array has "%" characters in it. I have to get the string(s) which have the least number of "%" in them. I know how I can get occurrences : ... (7 Replies)
Discussion started by: sinpeak
7 Replies

9. Shell Programming and Scripting

Sed command to replace with pattern except for text and closing parentheses

Can someone help me with a sed command: There will be multiple occurences in a file that look like this: MyFunction(12c34r5) and I need to replace that with just the 12c34r5 for every occurrence. The text between the parentheses will be different on each occurrence, so I can't search for that.... (4 Replies)
Discussion started by: missb
4 Replies

10. Shell Programming and Scripting

GREP between last occurrences of two strings

Hi I have the server.log file as: Server Stopped ABC DEF GHI JKL Server Started MNO PQR STU Server Stopped VWX YZ ABC Server Started Server Stopped 123 456 789 (9 Replies)
Discussion started by: ankur328
9 Replies
rlatex(1)						      General Commands Manual							 rlatex(1)

NAME
rlatex -- Wrapper to run LaTeX/jadeTeX multiple times as needed SYNOPSIS
[env LATEXPRG=latex-binary ] rlatex [latex-document] Description rlatex applies LaTeX or another LaTeX-based macro package (most notably jadetex, pdflatex, or pdfjadetex) to a given document, as many suc- cessive times as needed. It checks the output of a LaTeX pass, and launches a new pass when it notices specific strings which notify that the document's processing has not been finished. Caveats This version is mostly tuned for jadetex, and may cause some problems when using pure LaTeX. This ought to be fixed some day. Copyright Copyright (C) 2001-2003 Alcove & Yann Dirson. This rlatex is licensed under the GNU General Public License, version 2. It is heavily derived from the doc/rlatex script in the LILO source package, which is distributed under a BSD license. The original script does not mention its original author. This documentation is licensed under the GNU Free Documentation License, version 1. Contact us rlatex is part of the sgml2x package, which is part of the AlcoveBook project (link to URL http://www.alcove-labs.org/en/soft- ware/alcovebook/) . Please use the AlcoveBook mailing lists (link to URL https://savannah.gnu.org/mail/?group_id=533) to get in touch with developers and users. The list of bugs and feature requests is available through a Web interface (link to URL https://savannah.gnu.org/support/?group_id=533) . Please use it to submit problems and ideas. See also jadetex(1), pdfjadetex(1), latex(1), pdflatex(1). rlatex(1)
All times are GMT -4. The time now is 11:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy