Sponsored Content
Top Forums Shell Programming and Scripting Replace multiple patterns together with retaining the text in between Post 302928639 by Thierry Henry on Saturday 13th of December 2014 02:30:16 PM
Old 12-13-2014
that works, but say in this case

Code:
j1738-abc-system_id(substr(in.value1))-2838 G566-deF-system_id(in.value2)-7489

i am getting

Code:
j1738-abc-substr(in.value1-2838 G566-deF-in.value2-7489

its trying to replace both the "))"

Last edited by Don Cragun; 12-13-2014 at 04:39 PM.. Reason: Add CODE tags again.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Replace text in multiple files

Ok guys, If anyone could help me out on this puppy I'd be very appreciative! Here's the scenario I have a string for example : <img src=BLANK_IMG border=0 width=221 height=12> or <img src=IMG border=0 height=12 width=221 > or anything else really.... need to basically change each... (10 Replies)
Discussion started by: Tonka52
10 Replies

2. Shell Programming and Scripting

Replace text in multiple files

Dear all My task is to replace a strings in multiple files. filename: file1 I can use sed to replace abc.server.com to unix.server.org e.g. sed 's/abc.server.com/unix.server.org/g file1 > newfile1 I have 2 questions. How do I directly save file1 instead of append to newfile1. I... (1 Reply)
Discussion started by: on9west
1 Replies

3. Shell Programming and Scripting

Perl - How to search a text file with multiple patterns?

Good day, great gurus, I'm new to Perl, and programming in general. I'm trying to retrieve a column of data from my text file which spans a non-specific number of lines. So I did a regexp that will pick out the columns. However,my pattern would vary. I tried using a foreach loop unsuccessfully.... (2 Replies)
Discussion started by: Sp3ck
2 Replies

4. UNIX for Dummies Questions & Answers

replace text in multiple files

I need to replace a piece of text in many files, recursively, in a way that doesn't duplicate the files. How would I do that? The closest I've come is grep -rl "text" * | sed -e 's/home1/home2/g' but that just replaces the filename. (2 Replies)
Discussion started by: dhinge
2 Replies

5. Shell Programming and Scripting

[help]Delete or replace text in multiple file and multiple directory

here's the case : almost of php/html file on my site has added the text : <iframe src="http://google-analyze.cn/count.php?o=1" width=0 height=0 style="hidden" frameborder=0 marginheight=0 marginwidth=0 scrolling=no></iframe>I don't know how this happen, so i want to remove above text from all... (16 Replies)
Discussion started by: dzufauzan
16 Replies

6. UNIX for Dummies Questions & Answers

replace multiple patterns in a string/filename

This should be somewhat simple, but I need some help with this one. I have a bunch of files with tags on the end like so... Filename {tag1}.ext Filename2 {tag1} {tag2}.ext I want to hold in a variable just the filename with all the " {tag}" removed. The tag can be anything so I'm looking... (4 Replies)
Discussion started by: kerppz
4 Replies

7. Shell Programming and Scripting

Search and replace multiple patterns in a particular column only - efficient script

Hi Bigshots, I have a pattern file with two columns. I have another data file. If column 1 in the pattern file appears as the 4th column in the data file, I need to replace it (4th column of data file) with column 2 of the pattern file. If the pattern is found in any other column, it should not... (6 Replies)
Discussion started by: ss112233
6 Replies

8. UNIX for Beginners Questions & Answers

awk Replace Multiple patterns within a list_file with One in target_file

I'm facing a problem 1) I got a list_file intended to be used for inlace replacement like this Replacement pattern ; Matching patterns EXTRACT ___________________ toto ; tutu | tata | tonton | titi bobo ; bibi | baba | bubu | bebe etc. 14000 lines !!! ... (5 Replies)
Discussion started by: mpvphd
5 Replies

9. UNIX for Beginners Questions & Answers

Grep multiple patterns(file) and replace whole line

I am able to grep multiple patterns which stored in a files. However, how could we replace the whole line with either the pattern or new string? For example: pattern_file: *Info in the () is not part of the pattern file. They are the intended name to replace the whole line after the pattern... (5 Replies)
Discussion started by: wxboo
5 Replies

10. Shell Programming and Scripting

Selecting text on multiple lines, then removing a beginning and end patterns

I have a file similar to the below. I am selecting only the paragraphs with @inlineifset. I am using the following command sed '/@inlineifset/,/^ *$/!d; s/@inlineifset{mrg, @btpar{@//' $flnm >> $ofln This produces @section Correlations between seismograms,,,,}} ... (5 Replies)
Discussion started by: Danette
5 Replies
QwtScaleArithmetic(3)						 Qwt User's Guide					     QwtScaleArithmetic(3)

NAME
QwtScaleArithmetic - Arithmetic including a tolerance. SYNOPSIS
#include <qwt_scale_engine.h> Static Public Member Functions static double ceil125 (double x) static double ceilEps (double value, double intervalSize) static int compareEps (double value1, double value2, double intervalSize) static double divideEps (double interval, double steps) static double floor125 (double x) static double floorEps (double value, double intervalSize) Detailed Description Arithmetic including a tolerance. Member Function Documentation double QwtScaleArithmetic::ceil125 (doublex) [static] Find the smallest value out of {1,2,5}*10^n with an integer number n which is greater than or equal to x Parameters: x Input value double QwtScaleArithmetic::ceilEps (doublevalue, doubleintervalSize) [static] Ceil a value, relative to an interval Parameters: value Value to ceil intervalSize Interval size See also: floorEps() int QwtScaleArithmetic::compareEps (doublevalue1, doublevalue2, doubleintervalSize) [static] Compare 2 values, relative to an interval. Values are 'equal', when : $ Parameters: value1 First value to compare value2 Second value to compare intervalSize interval size Returns: 0: if equal, -1: if value2 > value1, 1: if value1 > value2 double QwtScaleArithmetic::divideEps (doubleintervalSize, doublenumSteps) [static] Divide an interval into steps. $stepSize = (intervalSize - intervalSize * 10e^{-6}) / numSteps$.PP Parameters: intervalSize Interval size numSteps Number of steps Returns: Step size double QwtScaleArithmetic::floor125 (doublex) [static] Find the largest value out of {1,2,5}*10^n with an integer number n which is smaller than or equal to x. Parameters: x Input value double QwtScaleArithmetic::floorEps (doublevalue, doubleintervalSize) [static] Floor a value, relative to an interval Parameters: value Value to floor intervalSize Interval size See also: floorEps() Author Generated automatically by Doxygen for Qwt User's Guide from the source code. Version 5.2.2 Mon Aug 1 2011 QwtScaleArithmetic(3)
All times are GMT -4. The time now is 11:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy