Two things to change in your lookup file:
a) don't pipe the cd $BOX to the next statement as it doen't make sense - cd has no output and ls doesn't read stdin.
b) strip the backticks off that entire command list; they make it try to execute the result of the ls, which is some cef_* file which is not executable.
Hi folks,
Need your help.
I am writing a KSH script to read a few commands from a file & execute.
I am using the following code to read the file line by line & excute each command. When I am printing each line I see it is printing properly but while excuting, the particular "ps" command... (5 Replies)
Hi, i facing a problem when run the script below..
while
do
if
then
printf "Please enter a name : "
read response # the problem occur here
if
then
ea_ident=${omc_ident}
else
#
# Check that name does not contain invalid... (14 Replies)
# include <stdio.h>
# include <fcntl.h>
# include <stdlib.h>
# include <sys/stat.h>
int main(int argc, char *argv)
{
int fRead, fPadded, padVal;
int btRead;
int BUFFSIZE = 512;
char buff;
if (argc != 4)
{
printf ("Please provide all of the... (3 Replies)
Please help with this simple example. I can not figure out how to do it. A file named “job” contains only this one line:var=5I need a script to read the job file and execute it as a command. This is my attempt (it does not work):#!/bin/sh
exec < job
echo "var = $var"output should read “var = 5”... (5 Replies)
Hello, I am quite new in shell scripting and I would like to write a little scritp to run a program on some parameters files.
all my parameters files are in the same directory, so pick them up with
ls *.para >>dirafter that I have a dir file like that:
param1.para
param2.para
etc...
I... (2 Replies)
Hello All,
i am a newbie and need some help when reading a csv file in a bourne shell script. I want to read 10 lines, then wait for a minute and then do a reading of another 10 lines and so on in the same way. I want to do this till the end of file.
Any inputs are appreciated
... (3 Replies)
Hi ALL,
I have a requirement like this.
1.GET ALL TABLE NAME (just table name) keep in file
2.Read line by line and get the count of table from tablename files.
tablename detail has a sql statement "db2 select tabname from syscat.tables" (1 Reply)
I need to develop a process/daemon which will constantly monitor a file for new entry and execute a command.
for eg, there is a file /var/log/inotify.log
When a new entry like below gets appeneded to this file, execute the command as follows.
/home/user/public_html/bad.php|CREATE
... (2 Replies)
Hi,
I have one script for which I want that other user should not read the script file but can execute. Is there any method ?
I tried by giving 711 but it gives Permission denied to other users.
For Generic User id as a work around , I have created alias in .bashrc file and other user... (4 Replies)
hi
when i am trying to check the file size using du command in shell script but getting a below error, although the file is present
du: cannot access `LOGS_18-08-20.tar.gz': No such file or directory
below is snippet of script
cd /home
dt=$(date --date="yesterday" +"%y-%m-%d")
du ... (3 Replies)
Discussion started by: scriptor
3 Replies
LEARN ABOUT DEBIAN
math::polygon::clip
Math::Polygon::Clip(3pm) User Contributed Perl Documentation Math::Polygon::Clip(3pm)NAME
Math::Polygon::Clip - frame a polygon in a square
INHERITANCE
Math::Polygon::Clip
is a Exporter
SYNOPSIS
my @poly = ( [1,2], [2,4], [5,7], [1, 2] );
my @box = ( $xmin, $ymin, $xmax, $ymax );
my $boxed = polygon_clip @box, @poly;
DESCRIPTION
Cut-off all parts of the polygon which are outside the box
FUNCTIONS
polygon_fill_clip1(ARRAY-BOX, LIST-OF-POINTS)
Clipping a polygon into rectangles can be done in various ways. With this algorithm (which I designed myself, but may not be new), the
parts of the polygon which are outside the BOX are mapped on the borders. The polygon stays in one piece.
Returned is one list of points, which is cleaned from double points, spikes and superfluous intermediate points.
polygon_fill_clip2(ARRAY-BOX, LIST-OF-POINTS)
To be implemented. The polygon falls apart in fragments, which are not connected: paths which are followed in two directions are
removed. This is required by some applications, like polygons used in geographical context (country contours and such).
polygon_fill_clip3(ARRAY-BOX, OUT-POLY, [IN-POLYS])
To be implemented. A surrounding polygon, with possible inclussions.
polygon_line_clip(ARRAY-BOX, LIST-OF-POINTS)
Returned is a list of ARRAYS (possibly 0 long) containing line pieces from the input polygon (or line).
example:
my @points = ( [1,2], [2,3], [2,0], [1,-1], [1,2] );
my @bbox = ( 0, -2, 2, 2 );
my @l = polygon_line_clip @bbox, @points;
print scalar @l; # 1, only one piece found
my @first = @{$l[0]}; # first is [2,0], [1,-1], [1,2]
SEE ALSO
This module is part of Math-Polygon distribution version 1.02, built on September 19, 2011. Website: http://perl.overmeer.net/geo/
LICENSE
Copyrights 2004,2006-2011 by Mark Overmeer. For other contributors see ChangeLog.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See
http://www.perl.com/perl/misc/Artistic.html
perl v5.12.4 2011-09-19 Math::Polygon::Clip(3pm)