Sponsored Content
Top Forums Shell Programming and Scripting SED replace string by occurrence Post 302172881 by uttamhoode on Wednesday 5th of March 2008 03:50:00 AM
Old 03-05-2008
how can i update the result in the same file? (inline edit)
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Search and replace to first occurrence of string

Hi all, I have a very large; delimited file. In vi I would like to replace: CSACT_DY;AVG_UEACT1;uesPerActiveLinkSetSize_1;#;A CSACT_DY;AVG_UEACT2;uesPerActiveLinkSetSize_2;#;A CSACT_DY;AVG_UEACT3;uesPerActiveLinkSetSize_3;#;A with: CSACT_DY;AVG_UEACT1;Average... (7 Replies)
Discussion started by: gilmord
7 Replies

2. Shell Programming and Scripting

Sed to print a string until the second occurrence of a character

Hi, I am totally new to shell scripting. I have a String "c:\working\html\index.txt.12-12-2009.bkp" I want to check if the string has more than one "." character. If it does I would like to retrieve only "c:\working\html\index.txt" i.e, discard the second occurrence of "." and the rest of the... (7 Replies)
Discussion started by: imr
7 Replies

3. Shell Programming and Scripting

SED to replace exact match, not first occurrence.

Lets say I have file.txt: (Product:Price:QuantityAvailable) (: as delimiter) Chocolate:5:5 Banana:33:3 I am doing a edit/update function. I want to change the Quantity Available, so I tried using the SED command to replace 5, but my Price which is also 5 is changed instead. (for the Banana... (13 Replies)
Discussion started by: andylbh
13 Replies

4. Shell Programming and Scripting

Replace x Number of String Occurrence with Sed

Ok, So I have a huge file that has over 12000 lines in it. in this file, there are 589 occurrences of the string "use five-minute-interval" spread in various areas in the file. How can i replace the the last 250 of the occurrences of "use five-minute-interval" with "use... (10 Replies)
Discussion started by: SkySmart
10 Replies

5. Shell Programming and Scripting

Sed diffrent replace by occurrence

I couldn't find the answer anywhere, so I hope you could help me. I need to change something like the following: something/bla/aaaa anything/bbb to: something --bla ----aaaa anything --bbb How do I do this? Is it possible with sed? I tried various patterns, but don't know how to... (5 Replies)
Discussion started by: Patwan
5 Replies

6. Shell Programming and Scripting

sed or awk command to replace a string pattern with another string based on position of this string

here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb cat dump.sql INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Discussion started by: vivek d r
10 Replies

7. Shell Programming and Scripting

Remove last occurrence of character (_) and rest of the string in UNIX (sed)

Hi I need help on this ..!! Input : xx_abc_regA xx_def_regB xx_qwe_regC Now i required the output as the below abc def qwe Need to remove last occurrence of character (_) and rest of the string in Unix (sed). Thanks in Advance ..!!! -Nallachand (3 Replies)
Discussion started by: Nallachand
3 Replies

8. Shell Programming and Scripting

How to insert file contents after nth occurrence of a string using sed?

Hi, I would like to know how, using sed, be able to insert contents of file2 in file1 after say the second occurrence of a given string? e.g. > cat file1 banana apple orange apple banana pear tangerine apple > cat file2 I don't like apples What would be the sed command to insert... (5 Replies)
Discussion started by: dimocn
5 Replies

9. AIX

Replace consecutive occurrence of string in same line

Hi All, I have a requirement to replace consecutive occurence of same string nedd to be replaced. Below is the input and desired output. Input: --------- 123.5|ABC|.|.|. 234.4|DEF|.|.|.|.|.| Output: --------- 123.5|ABC|||. 234.4|DEF||||| so basically "|.|" need to be replaced with... (9 Replies)
Discussion started by: ureddy
9 Replies

10. Shell Programming and Scripting

Replace first occurrence of a string in while loop

####Solved#### Hello, My aim is to replace searched string with incremented value under ubuntu 16.04. Example: aasasasas 9030 31wwo weopwoep weerasas 9030 ew31wo ieopwoep bbqqqsas 9030 ew3swo ieeopwoep ccsaqpas 9030 ewiro o2opwoep Expected: aasasasas 9030 31wwo weopwoep weerasas 9031... (2 Replies)
Discussion started by: baris35
2 Replies
QwtPoint3D(3)							 Qwt User's Guide						     QwtPoint3D(3)

NAME
QwtPoint3D - QwtPoint3D class defines a 3D point in double coordinates. SYNOPSIS
#include <qwt_point_3d.h> Public Member Functions QwtPoint3D () QwtPoint3D (double x, double y, double z) QwtPoint3D (const QwtPoint3D &) QwtPoint3D (const QPointF &) bool isNull () const double x () const double y () const double z () const double & rx () double & ry () double & rz () void setX (double x) void setY (double y) void setZ (double y) QPointF toPoint () const bool operator== (const QwtPoint3D &) const bool operator!= (const QwtPoint3D &) const Detailed Description QwtPoint3D class defines a 3D point in double coordinates. Constructor &; Destructor Documentation QwtPoint3D::QwtPoint3D () [inline] Constructs a null point. See also: isNull() QwtPoint3D::QwtPoint3D (doublex, doubley, doublez = 0.0) [inline] Constructs a point with coordinates specified by x, y and z. QwtPoint3D::QwtPoint3D (const QwtPoint3D &other) [inline] Copy constructor. Constructs a point using the values of the point specified. QwtPoint3D::QwtPoint3D (const QPointF &other) [inline] Constructs a point with x and y coordinates from a 2D point, and a z coordinate of 0. Member Function Documentation bool QwtPoint3D::isNull () const [inline] Returns true if the point is null; otherwise returns false. A point is considered to be null if x, y and z-coordinates are equal to zero. bool QwtPoint3D::operator!= (const QwtPoint3D &other) const [inline] Returns true if this rect and other are different; otherwise returns false. bool QwtPoint3D::operator== (const QwtPoint3D &other) const [inline] Returns true if this point and other are equal; otherwise returns false. double & QwtPoint3D::rx () [inline] Returns a reference to the x-coordinate of the point. double & QwtPoint3D::ry () [inline] Returns a reference to the y-coordinate of the point. double & QwtPoint3D::rz () [inline] Returns a reference to the z-coordinate of the point. void QwtPoint3D::setX (doublex) [inline] Sets the x-coordinate of the point to the value specified by x. void QwtPoint3D::setY (doubley) [inline] Sets the y-coordinate of the point to the value specified by y. void QwtPoint3D::setZ (doubley) [inline] Sets the z-coordinate of the point to the value specified by z. QPointF QwtPoint3D::toPoint () const [inline] Rounds 2D point, where the z coordinate is dropped. double QwtPoint3D::x () const [inline] Returns the x-coordinate of the point. double QwtPoint3D::y () const [inline] Returns the y-coordinate of the point. double QwtPoint3D::z () const [inline] Returns the z-coordinate of the point. Author Generated automatically by Doxygen for Qwt User's Guide from the source code. Version 6.0.0 Fri Apr 15 2011 QwtPoint3D(3)
All times are GMT -4. The time now is 02:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy