Sponsored Content
Top Forums Shell Programming and Scripting 2D Array to display characters Post 302171331 by Raynon on Thursday 28th of February 2008 07:38:45 AM
Old 02-28-2008
Wow Klashxx!! That code of your was spectacular !!
And thanks for the comprehensive explanation.
I have definitely learnt alot out of this.

Just a couple of question:
1) If the character to be displayed sometimes contain a maximum of 2 characters (number of characters will not exceed 2), how can you modify your code to suit this requirement ?
EG:
0101 AA
0102 B
0103 CD
0104 D
0201 EG
0202 F
0203 G
0204 HH

2) If the coordinates is not displayed in the input file , eg 0202 is not provided here, can you allow your code to print a minus character " - " when this situation arise.

EG:
0101 A
0102 B
0201 C

Expected output:
Code:
02  B  -
01  A  C
   01 02

 

10 More Discussions You Might Find Interesting

1. AIX

Display EBCDIC as Characters

Hi, Does anybody have a command to share that will display EBCDIC files as character? I have od -x -A d which will display hex as follows f0f1 f4f3 f0f0 f0f0 f0f6 f1f4 f6f3 f3f0 f3f9 f8f3 f1f6 f8f2 f860 d1e4 d360 f2f0 f0f5 4000 0000 5014 8c00 0000 0000 0c00 0000 0000 0d00 0000 5014 8c00... (1 Reply)
Discussion started by: LouPelagalli
1 Replies

2. UNIX for Dummies Questions & Answers

Garbage characters in display

:confused: I recently left managment and came back to AIX administration. So I am a bit rusty to say the least. The issue I am having is with the term settings when I either simply telnet to my AIX unit or even when I use an emulator like puTTY or a VAR provided one. Once I am logged into... (0 Replies)
Discussion started by: Haleja001
0 Replies

3. Shell Programming and Scripting

Display special characters

I have a file that evidently has some special characters in it. Is there a Unix command that I can use tp display the file so I can see the octal or hex values? (2 Replies)
Discussion started by: BCarlson
2 Replies

4. Shell Programming and Scripting

create array holding characters from sring then echo array.

Hi, I wish to store $string1 in $string1array a character in each array element. Then i wish to echo the entire array to the screen so that it reads as the normal string again. I have been trying with the code below but does not work. Please help... To put string into array: ... (5 Replies)
Discussion started by: rorey_breaker
5 Replies

5. UNIX for Dummies Questions & Answers

Display the contents of an array

Hi i have just registered So i am at university studying forensic computing and we have to learn c++ i have never done anything with c++ before and i am abit stuck i need to create a programme to display the contents of an array of characters forwards and in reverse Can anyone help me... (1 Reply)
Discussion started by: RossMc
1 Replies

6. UNIX and Linux Applications

Display non-english characters in shell

I don't know if this is the correct thread to post. If not tell me please. I have a script to make some queries to a Spanish Dictionay (Real Academia Espaņola) as follows: lynx -dump --nolist "buscon.rae.es/draeI/SrvltGUIBusUsual?TIPO_ HTML=2&LEMA="$1 It works this way: ./rae word ... (1 Reply)
Discussion started by: agasamapetilon
1 Replies

7. Shell Programming and Scripting

Display first few characters only

I have a file with one or two lengthy lines like.... masterUserID = 'S' OR masterUserID = 'S' OR masterUserID = 'S' (many many more times) How do I display only the first few hundred characters from each line. (1 Reply)
Discussion started by: shantanuo
1 Replies

8. UNIX for Dummies Questions & Answers

Display only the first two characters of all the lines from a file.

how do i Display only the first two characters of all the lines from a file.? (1 Reply)
Discussion started by: ritusubash
1 Replies

9. Shell Programming and Scripting

Store all the passed arguments in an array and display the array

Hi I want to write a script which store all the parameters passed to the script into an array. Once it is stored I want scan through the array and and delete those files for last month present inside the directory. The files in directory is appneded with YYYY_MM_DD. I want to know how can I... (3 Replies)
Discussion started by: dgmm
3 Replies

10. Shell Programming and Scripting

Pass array to a function and display the array

Hi All I have multiple arrays like below. set -A val1 1 2 4 5 set -A val2 a b c d . . . Now i would like to pass the individual arrays one by one to a function and display/ do some action. Note : I am using ksh Can you please advise any solution... Thanks in advance. (7 Replies)
Discussion started by: Girish19
7 Replies
GLGETTEXGEN(3G) 														   GLGETTEXGEN(3G)

NAME
glGetTexGendv, glGetTexGenfv, glGetTexGeniv - return texture coordinate generation parameters C SPECIFICATION
void glGetTexGendv( GLenum coord, GLenum pname, GLdouble *params ) void glGetTexGenfv( GLenum coord, GLenum pname, GLfloat *params ) void glGetTexGeniv( GLenum coord, GLenum pname, GLint *params ) PARAMETERS
coord Specifies a texture coordinate. Must be GL_S, GL_T, GL_R, or GL_Q. pname Specifies the symbolic name of the value(s) to be returned. Must be either GL_TEXTURE_GEN_MODE or the name of one of the texture generation plane equations: GL_OBJECT_PLANE or GL_EYE_PLANE. params Returns the requested data. DESCRIPTION
glGetTexGen returns in params selected parameters of a texture coordinate generation function that was specified using glTexGen. coord names one of the (s, t, r, q) texture coordinates, using the symbolic constant GL_S, GL_T, GL_R, or GL_Q. pname specifies one of three symbolic names: GL_TEXTURE_GEN_MODE params returns the single-valued texture generation function, a symbolic constant. The initial value is GL_EYE_LINEAR. GL_OBJECT_PLANE params returns the four plane equation coefficients that specify object linear-coordinate generation. Integer values, when requested, are mapped directly from the internal floating-point representation. GL_EYE_PLANE params returns the four plane equation coefficients that specify eye linear-coordinate generation. Integer values, when requested, are mapped directly from the internal floating-point representation. The returned val- ues are those maintained in eye coordinates. They are not equal to the values specified using glTexGen, unless the modelview matrix was identity when glTexGen was called. NOTES
If an error is generated, no change is made to the contents of params. When the GL_ARB_multitexture extension is supported, glGetTexGen returns the texture coordinate generation parameters for the active tex- ture unit. ERRORS
GL_INVALID_ENUM is generated if coord or pname is not an accepted value. GL_INVALID_OPERATION is generated if glGetTexGen is executed between the execution of glBegin and the corresponding execution of glEnd. SEE ALSO
glActiveTextureARB(3G), glTexGen(3G) GLGETTEXGEN(3G)
All times are GMT -4. The time now is 01:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy