i have this script that searches for a pattern.
However it fails if the pattern includes some
special characters. So far, it fails with the
following strings:
1. -Cr
2. $Mj
3. H'412
would a sed or awk be more effective?
i don't want the users to put the (\)
during the search (they... (5 Replies)
Hi all,
How do I extract a value without special characters? I need to extract the value of %Used from below and if its greater than 80, need to send a notification.
I am doing this right now..Its giving 17%..Is there a way to extract the value and assign it to a variable in one step?
df |grep... (3 Replies)
Hi all,
We are facing the following problem in our HP-UX machine: software that manipulates utf-8 encoded strings (e.g. during string cut), fails to correctly manipulate strings (all containing Greek characters) that contain special characters like @, &, # etc. Actually, in different... (3 Replies)
Hi All,
I have a CSV file in which some fields contains special character for ex:-
my file is file 1
cat file1
abcd,bgfht,ngbht,abvc ****
hdlld,hsgdt,bhfy,knht ****
whenever i am trying to put a 4th feild in a variable its giving me list of all the files i have in current... (6 Replies)
I'm using awk '{print $1}' and it works most of the time to print the contents of a mysql query loop, but occationally I get a field with some special character in it, is there a way to tell awk to ignore all special characters between my FS? I have >186K records, so building a list of ALL special... (6 Replies)
Hi Experts.
I'm stuck with the below AWK code where i'm trying to move the records containing any special characters in the last field to a bad file.
awk -F, '{if ($NF ~ /^|^/) print >"goodfile";else print >"badfile"}' filename
sample data
1,abc,def,1234,A *
2,bed,dec,342,* A ... (6 Replies)
grep -i "$line,$opline" COMBO_JUNK|awk -F, '
{
C4+=$4
}
{
}
END {
print C4
}
' OFS=,`
when i run this command in the script.... it o/p all the value as 0 if $line contains any special parameters.....
but the same script if i run in command prompt... it shows... (4 Replies)
This is really frustrating because I can't figure it out.
I'm running a health check script. One of the items I'm checking is the amount of memory on a server. I use the free command, which outputs something like this (excerpt)
Mem: 100 100 100 100
Swap: 100 100 100 100
In my debugging... (5 Replies)
Hello Folks,
Need to bisect strings based on a subset.
Below works good.
echo /a/b/c/d | awk -F"/c/d$" '{print $1}'
/a/b
However, it goes awry with special characters.
echo /a/b/c+/d | awk -F"/c+/d$" '{print $1}'
/a/b/c+/d
Desired output:
/a/b
Escaping the special characters... (11 Replies)
Discussion started by: vibhor_agarwali
11 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)