i need to use sed to remove an entire line containing a pattern stored in a variable say $var1
this var1 will be a URL and will therefore contain slashes
any help would be greatly appreciated (1 Reply)
I have a file that will sometimes contain a pattern. The pattern is this:
W/D FRM CHK 00
I want to find any lines with this pattern, delete those lines, and also delete the line above and the line below. (1 Reply)
I am trying to delete a pattern without removing line. I searched a lot in this forum and using those I could come up with sed command but it seems that command does not work. Here's how my file looks like:
1 ./63990 7
1171 ./63990 2
2425 ./63990 9
2539 ./63990 1
3125 ./63990 1
10141... (7 Replies)
Hi,
I have got the below requirement. please suggest.
I have a file like,
Processing Item is:
/data/ing/cfg2/abc.txt
/data/ing/cfg3/bgc.txt
Processing Item is:
/data/cmd/for2/ght.txt
/data/kernal/config.klgt.txt
I want to process the above file to get the output file like,
... (5 Replies)
Hi,
I want to remove the spaces from all the lines matching a particular pattern from my file. For instance in file abc.txt I have following data.
Header,This is the header
111,this is 1st record
222, this is 2nd record
333, this is 3rd record
Footer,3 records found
Footer,111222333 ... (5 Replies)
Hi Everybody! First post! Totally noobie.
I'm using the terminal to read a poorly formatted book.
The text file contains, in the middle of paragraphs, hyphenation to split words that are supposed to be on multiple pages. It looks ve -- ry much like this.
I was hoping to use grep -v " -- "... (5 Replies)
I am trying to combine lines with these conditions:
1. First line starts with text of "libname VALUE db2 datasrc" where VALUE can be any text.
2. If condition1 is met then continue to combine lines through a line that ends with a semicolon.
3. Ignore case when matching patterns and remove any... (5 Replies)
tkspline(n) Tk Spline - An additional smoothing method for canvas items tkspline(n)
__________________________________________________________________________________________________________________________________________________NAME
spline, - additional smoothing method for canvas items.
SYNOPSIS
package require Tkspline
...
.c create line ... -smooth spline ...
.c create polygon ... -smooth spline ...
_________________________________________________________________INTRODUCTION
The new option value: -smooth spline provides an additional smoothing method to line and polygon canvas items.
Spline smoothing will revert to the builtin smoothing method unless the number of points is 3n+1, where n is the number of spline segments.
(Normally in polygons this means 3n points because the last point of the spline is understood to be the same as the first in order to close
the polygon).
In line and polygon items, the curves generated with the standard -smooth true option have the following properties:
- the curve is always tangential to a straight line between consecutive points.
- the curve is only guaranteed to intersect the first and last points of lines.
- the curve is not guaranteed to intersect any points of polygons.
With -smooth spline (and the right number of coordinates) the curves generated have the following different properties:
- the curve is guaranteed to intersect the first point, and every third point after that.
- each segment of the curve shares endpoints with the adjacent segments, but is otherwise independent of them.
- the curve is guaranteed to be tangential to a line between n and n+1 at point n, and also to a line between n+2 and n+3 at point n+3.
- the curve is not guaranteed to be smooth at the junctions between segments unless the shared point and the points either side of it are
on a straight line.
These alternative properties are useful to some path planning algorithms.
CREDITS
The underlying Bezier code is in John Ousterhout's original canvas widget, this extension just provides an alternate interface to it. The
hooks into the canvas are provided by Jan Nijtmans in his "dash" patch.
KEYWORDS
spline, line, polygon, bezier, canvas, widget
AUTHOR
John Ellson, ellson@graphviz.org
Tk 8.0 tkspline(n)