First, why would you use such a sed script within Perl? But whatever. Second, the second back-ticked command, while functionally correct, is not as good or as clear as:
Third, the last one in the array never gets converted. That's because $#test is the last index in the array of @test, and you're telling the while loop to stop before count is equal to this.
Now to your actual question. I dont know. This worked when I ran sample code and on the files (except for the last). However, better code would be as follows:
Hello,
I have a comma delimited input feed file. The first field has directory location and the second field has file name.
Ex of input feed:
/export/appl/a,abc*.dat
/export/appl/b,xyz*.dat
/export/appl/c,pmn*.dat
Under each directory, there would be many files like...
.
.
.... (4 Replies)
How do I access one of the indices in array tst with the code below?
tst=sprintf("%5.2f",Car / 12)
When I scan thru the array with
for ( i in tst ) { print i,tst }
I get the output of:
vec-7 144
But when I try this in the END
print tst
It looks like it's not set.
What am... (6 Replies)
Hi,
My doubt is how to access array elements..
Situation is as below:
#!/bin/ksh
set -x
typeset -i x=0
typeset -i y=0
typeset -i BID=0
typeset -i count=0
while ] ; do
x=`expr $x + 1`;
hwmgr show scsi > scsi.tmp
while read line; do
set... (1 Reply)
I need to use array elements while pattern matching.
@myarr = (ELEM1, ELEM2, ELEM3);
following is the statement which I am using in my code. Basically I want to replace the ELEM1/2/3 with other thing which is mentioned as REPL here.
if (condition) {
s/(ELEM1|ELEM2|ELEM3): REPL: /;
}
I... (3 Replies)
What is wrong with this line in a perl script?
$amc_data = `sed -n '/\/,/\/p' "$config_file"`
I ran the above from command line and it works fine from unix command prompt.
The code should produce output between the and tags.
The config_file is as follows:
Sun ... (2 Replies)
Hello,
I have the following perl array:
@longname = (Fasthernet0/0 Fasthernet0/1 Serial0/1/0 Serial0/2/1 Tunnel55 Tunnel77)
with the followinh array:
@shortname = (Fa0/0 Fa0/1 Se0/1/0 Se0/2/1 Tu55 Tu77)
in other words, I need to remove the following from each element in the array... (4 Replies)
Hi all,
I can’t resolve an array element access issue on (Linux/pdksh) .. So I’m positing for advice.By the way - a friend demonstrated to me - same script works as expected under Solaris.
I have been working on a documentation project where many *.jpg screen shots are used in the... (4 Replies)
Hi all,
Not sure if this should be in the programming forum, but I believe it will get more response under the Shell Programming and Scripting FORUM.
Am trying to write a customized df script in Perl and need some help with regards to using arrays and file handlers.
At the moment am... (3 Replies)
Experts,
I am looking to compare elements of 2 array using perl. Below is not the actual code but logic wise something like this.
my $version = "MYSQlcl-5.2.4-264.x86_64"; <-- split this word into array as (5 2 4 264) ( which is to extract only the version number from the package name)
my... (1 Reply)
Hi
I am trying to store the output of a command into an array in perl script.
I am able to store but the problem is i am unable to print the array line with one line space. i mean i inserted the \n in loop ...but not getting the result.
I have written like this
#!/usr/bin/perl
@a =... (2 Replies)
Discussion started by: kumar85shiv
2 Replies
LEARN ABOUT DEBIAN
glscissorarray
GLSCISSORARRAY(3G) [FIXME: manual] GLSCISSORARRAY(3G)NAME
glScissorArray - define the scissor box for multiple viewports
C SPECIFICATION
void glScissorArrayv(GLuint first, GLsizei count, const GLint *v);
PARAMETERS
first
Specifies the index of the first viewport whose scissor box to modify.
count
Specifies the number of scissor boxes to modify.
v
Specifies the address of an array containing the left, bottom, width and height of each scissor box, in that order.
DESCRIPTION
glScissorArrayv defines rectangles, called scissor boxes, in window coordinates for each viewport. first specifies the index of the first
scissor box to modify and count specifies the number of scissor boxes to modify. first must be less than the value of GL_MAX_VIEWPORTS,
and first + count must be less than or equal to the value of GL_MAX_VIEWPORTS. v specifies the address of an array containing integers
specifying the lower left corner of the scissor boxes, and the width and height of the scissor boxes, in that order.
To enable and disable the scissor test, call glEnable() and glDisable() with argument GL_SCISSOR_TEST. The test is initially disabled for
all viewports. While the test is enabled, only pixels that lie within the scissor box can be modified by drawing commands. Window
coordinates have integer values at the shared corners of frame buffer pixels. glScissor(0,0,1,1) allows modification of only the lower
left pixel in the window, and glScissor(0,0,0,0) doesn't allow modification of any pixels in the window.
When the scissor test is disabled, it is as though the scissor box includes the entire window.
ERRORS
GL_INVALID_VALUE is generated if first is greater than or equal to the value of GL_MAX_VIEWPORTS.
GL_INVALID_VALUE is generated if first + count is greater than or equal to the value of GL_MAX_VIEWPORTS.
GL_INVALID_VALUE is generated if any width or height specified in the array v is negative.
ASSOCIATED GETS
glGet() with argument GL_SCISSOR_BOX
glIsEnabled() with argument GL_SCISSOR_TEST
SEE ALSO
glEnable(), glViewport(), glViewportIndexed(), glViewportArray()
COPYRIGHT
Copyright (C) 2010 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication
License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.
[FIXME: source] 05/30/2012 GLSCISSORARRAY(3G)