Because in a regular expression a dot matches anything. Escape the dot
Is it not better to do something like:
Yes, I use the second code but about the first code, I have solved the problem escaping the dot. The problem was that I have proved to scape the dot, before your answer, but not using quotes. Using quotes like this "\.sh$", it works.
Hi,
I have to write a program to compute the checksums of files
./script.sh
I wrote the program using bash and it took me forever since I am a beginner but it works very well.
I'm getting so close to the deadline and I realised today that actually I have to use normal Bourne shell... (3 Replies)
Hi
Can anyone please help me in knowing the list of scripts which are running in cron .
I mean suppose there are users
1.A
2.B
3.C
4.D
5.E
users on a pariticular server
I need to have a script which will display all the scripts that are runnin in cron for all the above users ? is it... (1 Reply)
Hi folks
I use a Solaris 10 box with Bash shell.
I have here a script (it works!) to list all scripts in crontab which contains the string "sqlplus":
for i in $(ls `crontab -l | grep -v '#' | awk '{ print $6 }' | grep -v '^$'`); do grep -l 'sqlplus' "$i"; done
Is there a more elegant... (1 Reply)
Folks,
I have written one script for following condition by referring some of online post in this forum. Please correct it if I'm missing something in it. (OS: AIX 5.3)
List the idle user. (I used whoidle command to list first 15 user and get username, idle time, pid and login time).... (4 Replies)
I am trying to show the number of dead accts or false shells running and include a count at the end. Does anyone know how to go about this? Thanks - citizencro (3 Replies)
Dear Members,
I have a table REQUESTS in Oracle which has an attribute REQUEST_ACTION. The entries in REQUEST_ACTION are like, ME, MD, ND, NE etc.
I would like to create a script which will will call other scripts based on the request action.
Can we directly read from the REQUEST_ACTION... (2 Replies)
i have this code that i want to run but it is not working
i.e if the user slected say production it will then run the command for production
any ideas what i need to change
set question to choose from list {"production"}
set answer to question
if answer question is "Production: then ... (5 Replies)
I am writing a bash script to run test some scripts.
The names scripts of the scripts to tests are stored in an array.
scptArr='chcksfrd.bash'
scptArr='compute-misfit.bash'
scptArr='compute-travel-times.bash'
scptArr='create-data-tinv.bash'
scptArr='create-docs.bash' ... (3 Replies)
Discussion started by: kristinu
3 Replies
LEARN ABOUT MOJAVE
glevalmesh
GLEVALMESH(3G)GLEVALMESH(3G)NAME
glEvalMesh1, glEvalMesh2 - compute a one- or two-dimensional grid of points or lines
C SPECIFICATION
void glEvalMesh1( GLenum mode,
GLint i1,
GLint i2 )
PARAMETERS
mode In glEvalMesh1, specifies whether to compute a one-dimensional mesh of points or lines. Symbolic constants GL_POINT and GL_LINE are
accepted.
i1, i2
Specify the first and last integer values for grid domain variable i.
C SPECIFICATION
void glEvalMesh2( GLenum mode,
GLint i1,
GLint i2,
GLint j1,
GLint j2 )
PARAMETERS
mode In glEvalMesh2, specifies whether to compute a two-dimensional mesh of points, lines, or polygons. Symbolic constants GL_POINT,
GL_LINE, and GL_FILL are accepted.
i1, i2 Specify the first and last integer values for grid domain variable i.
j1, j2 Specify the first and last integer values for grid domain variable j.
DESCRIPTION
glMapGrid and glEvalMesh are used in tandem to efficiently generate and evaluate a series of evenly-spaced map domain values. glEvalMesh
steps through the integer domain of a one- or two-dimensional grid, whose range is the domain of the evaluation maps specified by glMap1
and glMap2. mode determines whether the resulting vertices are connected as points, lines, or filled polygons.
In the one-dimensional case, glEvalMesh1, the mesh is generated as if the following code fragment were executed:
glBegin( type );
for ( i = i1; i <= i2; i += 1 )
glEvalCoord1( i dot DELTA u + u1 );
glEnd();
where
DELTA(u) = (u2 - u1 ) / n
and n, u1, and u2 are the arguments to the most recent glMapGrid1 command. type is GL_POINTS if mode is GL_POINT, or GL_LINES if mode is
GL_LINE.
The one absolute numeric requirement is that if i = n, then the value computed from i dot DELTA(u) + u1 is exactly u2.
In the two-dimensional case, glEvalMesh2, let
DELTA(u) = ( u2 - u1 ) / n
DELTA(v) = ( v2 - v1 ) / m,
where n, u1, u2, m, v1, and v2 are the arguments to the most recent glMapGrid2 command. Then, if mode is GL_FILL, the glEvalMesh2 command
is equivalent to:
for ( j = j1; j < j2; j += 1 ) {
glBegin( GL_QUAD_STRIP );
for ( i = i1; i <= i2; i += 1 ) {
glEvalCoord2( i dot DELTA(u) + u1, j dot DELTA(v) + v1 );
glEvalCoord2( i dot DELTA(u) + u1, (j+1) dot DELTA(v) + v1 );
}
glEnd();
}
If mode is GL_LINE, then a call to glEvalMesh2 is equivalent to:
for ( j = j1; j <= j2; j += 1 ) {
glBegin( GL_LINE_STRIP );
for ( i = i1; i <= i2; i += 1 )
glEvalCoord2( i dot DELTA(u) + u1, j dot DELTA(v) + v1 );
glEnd();
}
for ( i = i1; i <= i2; i += 1 ) {
glBegin( GL_LINE_STRIP );
for ( j = j1; j <= j1; j += 1 )
glEvalCoord2( i dot DELTA(u) + u1, j dot v + v1 );
glEnd();
}
And finally, if mode is GL_POINT, then a call to glEvalMesh2 is equivalent to:
glBegin( GL_POINTS );
for ( j = j1; j <= j2; j += 1 )
for ( i = i1; i <= i2; i += 1 )
glEvalCoord2( i dot u + u1, j dot DELTA(v) + v1 );
glEnd();
In all three cases, the only absolute numeric requirements are that if i = n, then the value computed from i dot DELTA(u) + u1 is exactly
u2, and if j = m, then the value computed from j dot DELTA(v) + v1 is exactly v2.
ERRORS
GL_INVALID_ENUM is generated if mode is not an accepted value.
GL_INVALID_OPERATION is generated if glEvalMesh is executed between the execution of glBegin and the corresponding execution of glEnd.
ASSOCIATED GETS
glGet with argument GL_MAP1_GRID_DOMAIN
glGet with argument GL_MAP2_GRID_DOMAIN
glGet with argument GL_MAP1_GRID_SEGMENTS
glGet with argument GL_MAP2_GRID_SEGMENTS
SEE ALSO
glBegin, glEvalCoord, glEvalPoint, glMap1, glMap2, glMapGrid
GLEVALMESH(3G)