I have text file like as below
I expect the output like as below
I am using the below code to show the messge. But it process each and every line. How to ignore first 5 lines and Nth(Last) Line of the file. Please suggest some awk releated stuffs.
Thanks,
Mani Muthu
Hi,
My awk program is failing. I figured out using command
od -c filename
that the last line of the file doesnt end with a new line character.
Mine is an automated process because of this data is missing.
How do i handle this?
I want to append new line character at the end of last... (2 Replies)
Hi Sorry to multipost. I am opening the new thread because the earlier threads head was misleading to my current doubt.
and i am stuck.
list=`cat /u/Test/programs`;
psg "ServTest" | awk -v listawk=$list '{
cmd_name=($5 ~ /^/)? $9:$8
for(pgmname in listawk)
... (6 Replies)
I have several hundreds of tiny files which need to be concatenated into one single line and all those in a single file. Some files have several blank lines. Tried to use this script but failed on it.
awk 'END { print r } r && !/^/ { print FILENAME, r; r = "" }{ r = r ? r $0 : $0 }' *.txt... (8 Replies)
im a newbee to unix.
I have a requirement to compare two files with awk.
file1.txt
a
b
c
d
e
file2.txt
a
b
d
e
here i want to compare each line in file1 with corresponding line in file2 and prinf the line with difference. ie to check
required result as shown below
a=a (dont... (3 Replies)
Hey, not too good at this, so I only managed a clumsy and SLOW solution to my problem that needs a drastic speed up. Any ideas how I write the following in awk only?
Code is supposed to do...
For every line read column values $6, $7, $8 and do a calculation with the same column values of every... (6 Replies)
I have a script that builds a database ~30 million lines, ~3.7 GB .cvs file. After multiple optimzations It takes about 62 min to bring in and parse all the files and used to take 10 min to remove duplicates until I was requested to add another column. I am using the highly optimized awk code:
awk... (34 Replies)
Hello,
I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be:
SRVXPAPI001 ERRO JUN24 07:28:34 1775
REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F
... (8 Replies)
How do you write a script to ignore all lines except the --- dash lines and then remove --- dashes from the data in a text file?
Also how do you separate data in a text file with a tab (for example, column1 (software) and column2 (date) ) ?
Here is my scripts : I am getting errors in... (3 Replies)
My file (the output of an experiment) starts off looking like this,
_____________________________________________________________
Subjects incorporated to date: 001
Data file started on machine PKSHS260-05CP
**********************************************************************
Subject 1,... (9 Replies)
Hello,
I have some code that works more or less. This is called by a make file to adjust some hard-coded definitions in the src code. The script generated some values by looking at some of the src files and then writes those values to specific locations in other files. The awk code is used to... (3 Replies)
Discussion started by: LMHmedchem
3 Replies
LEARN ABOUT DEBIAN
geometry::primitive::line
Geometry::Primitive::Line(3pm) User Contributed Perl Documentation Geometry::Primitive::Line(3pm)NAME
Geometry::Primitive::Line - A Line
DESCRIPTION
Geometry::Primitive::Line represents a straight curve defined by two points.
SYNOPSIS
use Geometry::Primitive::Line;
my $line = Geometry::Primitive::Line->new();
$line->start($point1);
$line->end($point2);
ATTRIBUTES
end
Set/Get the end point of the line.
start
Set/Get the start point of the line.
METHODS
new
Creates a new Geometry::Primitive::Line
contains_point
Returns true if the supplied point is 'on' the line. Accepts either a point object or an x y pair.
grow
Does nothing, as I'm not sure how. Patches or hints welcome.
is_parallel ($other_line)
Returns true if the supplied line is parallel to this one.
is_perpendicular ($other_line)
Returns true if the supplied line is perpendicular to this one.
length
Get the length of the line.
point_end
Get the end point. Provided for Shape role.
point_start
Get the start point. Provided for Shape role.
scale
Does nothing at the moment.
slope
Get the slope of the line.
to_string
Guess!
y_intercept
Returns the Y intercept of this line.
AUTHOR
Cory Watson <gphat@cpan.org>
COPYRIGHT & LICENSE
You can redistribute and/or modify this code under the same terms as Perl itself.
perl v5.10.1 2010-01-10 Geometry::Primitive::Line(3pm)