08-31-2010
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
please give me proper solution for finding a shortest substring from given string if string itself and first char and last char of that substr are also given by user
if S="dpoaoqooroo" and FC="o" and LC="o",then shortest substr is "oo" and rest of the string is "dpoaoqroo"
i have code but it is... (1 Reply)
Discussion started by: pankajd
1 Replies
2. UNIX for Dummies Questions & Answers
hi guys, i am looking for the shortest way to get to home directory using Absolute & Relative paths.
Anything except cd or cd/home/user
any help would be deeply appreciated. (3 Replies)
Discussion started by: incipientmind
3 Replies
3. Shell Programming and Scripting
hi all,
i need an urgent help for writing a shell script which will extract out and print a substring which is the shortest substring from the given string where first and last character of that substring will be given by the user.
for e.g.
if str="abcdpqracdpqaserd"
now if the user gives 'a'... (18 Replies)
Discussion started by: pankajd
18 Replies
4. Shell Programming and Scripting
I got a file called Album in that there is list of songs i want to find the Longest and shortest song name in field 2 ie ($2)....
Please help me with "awk" (2 Replies)
Discussion started by: Markwaugh
2 Replies
5. Shell Programming and Scripting
Hi Everyone,
a.txt
cola,colb1111
601030,CEL
6031,CEL
60103,CEL
Would like to find the longest field colb1111, and shortest, so the output is 6, 4
my code:
#!/usr/bin/perl
use strict;
use warnings;
my %prefix_to_contry = ();
my $key;
open(FH,'/root/a.txt') or die "$!"; (0 Replies)
Discussion started by: jimmy_y
0 Replies
6. Shell Programming and Scripting
hi all,
suppose a key string: M0271857
and to find all lines containing this key string in a text file
which returns multiple lines
but i only want the shortest one
is there a way to do that?
thanks so much! (4 Replies)
Discussion started by: sunnydanniel
4 Replies
7. Shell Programming and Scripting
Hi,
How can I display only one shortest path (A/B/configure)?
$ grep configure file.txt
A/B/configure
A/B/C/configure
A/B/C/D/configure
Thank you. (9 Replies)
Discussion started by: hce
9 Replies
8. Shell Programming and Scripting
Hi all, I have this file __DATA__
child, Parent, probability,
M7, Q, P,
M7, M28, E,
M28, M6, E,
M6, Q, Pl,
& several hundred lines..... Legends: P(= Probable) > Pl(=Plausible) > E(=Equivocal). What I want is for each child I want to trace it... (5 Replies)
Discussion started by: rushadrena
5 Replies
9. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I have to write a program that have to read every standard input then print out the line number and the content of... (10 Replies)
Discussion started by: scopiop
10 Replies
10. UNIX for Advanced & Expert Users
Currently I am using this laborious command
lvdisplay | awk '/LV Path/ {p=$3} /LV Name/ {n=$3} /VG Name/ {v=$3} /Block device/ {d=$3; sub(".*:", "/dev/dm-", d); printf "%s\t%s\t%s\n", p, "/dev/mapper/"v"-"n, d}'
Would like to know if there is any shorter method to get this mapping of... (2 Replies)
Discussion started by: royalibrahim
2 Replies
LEARN ABOUT XFREE86
glmapgrid2d
GLMAPGRID(3G) GLMAPGRID(3G)
NAME
glMapGrid1d, glMapGrid1f, glMapGrid2d, glMapGrid2f - define a one- or two-dimensional mesh
C SPECIFICATION
void glMapGrid1d( GLint un,
GLdouble u1,
GLdouble u2 )
void glMapGrid1f( GLint un,
GLfloat u1,
GLfloat u2 )
void glMapGrid2d( GLint un,
GLdouble u1,
GLdouble u2,
GLint vn,
GLdouble v1,
GLdouble v2 )
void glMapGrid2f( GLint un,
GLfloat u1,
GLfloat u2,
GLint vn,
GLfloat v1,
GLfloat v2 )
PARAMETERS
un Specifies the number of partitions in the grid range interval [u1, u2]. Must be positive.
u1, u2
Specify the mappings for integer grid domain values i=0 and i=un.
vn Specifies the number of partitions in the grid range interval [v1, v2]
(glMapGrid2 only).
v1, v2
Specify the mappings for integer grid domain values j=0 and j=vn
(glMapGrid2 only).
DESCRIPTION
glMapGrid and glEvalMesh are used together 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.
glMapGrid1 and glMapGrid2 specify the linear grid mappings between the i (or i and j) integer grid coordinates, to the u (or u and v)
floating-point evaluation map coordinates. See glMap1 and glMap2 for details of how u and v coordinates are evaluated.
glMapGrid1 specifies a single linear mapping such that integer grid coordinate 0 maps exactly to u1, and integer grid coordinate un maps
exactly to u2. All other integer grid coordinates i are mapped so that
u=i(u2-u1)/un+u1
glMapGrid2 specifies two such linear mappings. One maps integer grid coordinate i=0 exactly to u1, and integer grid coordinate i=un
exactly to u2. The other maps integer grid coordinate j=0 exactly to v1, and integer grid coordinate j=vn exactly to v2. Other integer
grid coordinates i and j are mapped such that
u=i(u2-u1)/un+u1
v=j(v2-v1)/vn+v1
The mappings specified by glMapGrid are used identically by glEvalMesh and glEvalPoint.
ERRORS
GL_INVALID_VALUE is generated if either un or vn is not positive.
GL_INVALID_OPERATION is generated if glMapGrid 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
glEvalCoord(3G), glEvalMesh(3G), glEvalPoint(3G), glMap1(3G), glMap2(3G)
GLMAPGRID(3G)