Sponsored Content
Full Discussion: Adding array element in KSH
Top Forums Shell Programming and Scripting Adding array element in KSH Post 302269418 by Shoeless_Mike on Wednesday 17th of December 2008 03:20:43 PM
Old 12-17-2008
Bump - please help
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shift array element

I want to delete and 0th element of array in shell scrpit and also shift all others to one level up. (2 Replies)
Discussion started by: darshakraut
2 Replies

2. Shell Programming and Scripting

Problem to initialize ksh array when first element includes hyphen

Hi I'm trying to create an array with variable including hyphen but ksh refuses the first element set -A allArgs set +A allArgs ${allArgs} -all set +A allArgs ${allArgs} -date set +A allArgs ${allArgs} test ./test.ksh: -all: bad option(s) It happens only when first element is like... (4 Replies)
Discussion started by: gdan2000
4 Replies

3. Emergency UNIX and Linux Support

Assigning zero to element of ksh array.

set -A matched #find referenced files. for i in ${file_names_html} do counter_j=0 for j in ${file_names_minus_index} do match=`cat $i | grep... (1 Reply)
Discussion started by: robin_simple
1 Replies

4. Shell Programming and Scripting

ksh insert element in array

Hi all, I need help with the following scenario in ksh. If the number of elements contained by arrayA is 11 I need to insert a zero as the element arrayA then print all arrayA elements separated by comma. Appreciate your help. (9 Replies)
Discussion started by: ejianu
9 Replies

5. Shell Programming and Scripting

Not able to call an element from an array in ksh

Hi, I have: # Initialize variables #!/usr/bin/ksh FILENM=$1 INDEX=0 # read filename echo "You are working with the Config file: $FILENM" while read line do echo $line data=$line ((INDEX=INDEX+1)) done <"$FILENM" (3 Replies)
Discussion started by: Marc G
3 Replies

6. Shell Programming and Scripting

File names as array element in ksh

Hi, I have an ksh array(ARR). the elements to the array are file names. i need to go to each file in the array and manipulate the records. for name in ${files}; do ---this loop is for all the file names in the array for i in $(wc -l < $name); do --this loop is for all the records in... (20 Replies)
Discussion started by: usrrenny
20 Replies

7. UNIX for Advanced & Expert Users

Array Element

This question is for someone that's more familiar with Array Element. I need to know if the maximum array element that can be assigned is 1024 and if its so, Is there a workaround solution when the counter exceeded 1024? param_array="$param_nam" counter=$counter+1 #to avoid space... (3 Replies)
Discussion started by: cumeh1624
3 Replies

8. Shell Programming and Scripting

Adding an element to a bash array with a variable

Hello, I have a simple task and I am having some trouble with the syntax. I have a variable with an assigned value, CMD_STRING='-L 22 -s 0 -r -O -A i -N 100 -n' I would like to add that variable to an array. As far as I have been able to look up, the syntax should be something like, ... (4 Replies)
Discussion started by: LMHmedchem
4 Replies

9. Shell Programming and Scripting

Adding character and append last element of second column

Hi, could you help me in processing this file under bash? I need to add some text to the first line and then append the last element of the second columns. The input file is tab separated while the output should be space separated. input file is 1.00E-02 2.00E-02 4.465E+17 2.00E-02 3.00E-02... (4 Replies)
Discussion started by: f_o_555
4 Replies

10. UNIX for Beginners Questions & Answers

Adding to an array in an external file, and adding elements to it.

I have an array in an external file, "array.txt", which contains: char *testarray={"Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"};I want to be able to add an element to this array, and have that element display, whenever I call it, without having to recompile... (29 Replies)
Discussion started by: ignatius
29 Replies
SoTextureUnit(3)						       Coin							  SoTextureUnit(3)

NAME
SoTextureUnit - The SoTextureUnit class is a node for setting the active texture unit. When an SoTextureUnit node is inserted into the scene graph, all subsequent texture nodes (SoTexture2, SoTextureCoordinate2, SoTextureCoordinate3, SoTexture2Transform, SoTexture3Transform, SoTextureCoordinateEnvironment, SoTextureCoordinatePlane and SoComplexity) will affect the texture unit set in the unit field. SYNOPSIS
#include <Inventor/nodes/SoTextureUnit.h> Inherits SoNode. Public Types enum MappingMethod { BUMP_MAPPING, IMAGE_MAPPING } Public Member Functions virtual SoType getTypeId (void) const SoTextureUnit (void) virtual void doAction (SoAction *action) virtual void callback (SoCallbackAction *action) virtual void GLRender (SoGLRenderAction *action) virtual void pick (SoPickAction *action) Static Public Member Functions static SoType getClassTypeId (void) static void initClass (void) static uint32_t getMaxTextureUnit (void) Public Attributes SoSFInt32 unit SoSFEnum mappingMethod Protected Member Functions virtual const SoFieldData * getFieldData (void) const virtual ~SoTextureUnit () Static Protected Member Functions static const SoFieldData ** getFieldDataPtr (void) Additional Inherited Members Detailed Description The SoTextureUnit class is a node for setting the active texture unit. When an SoTextureUnit node is inserted into the scene graph, all subsequent texture nodes (SoTexture2, SoTextureCoordinate2, SoTextureCoordinate3, SoTexture2Transform, SoTexture3Transform, SoTextureCoordinateEnvironment, SoTextureCoordinatePlane and SoComplexity) will affect the texture unit set in the unit field. See the SoGuiExample module for an usage example for this node. FILE FORMAT/DEFAULTS: TextureUnit { unit 0 mappingMethod IMAGE_MAPPING } Since: Coin 2.2 Member Enumeration Documentation enum SoTextureUnit::MappingMethod Enumerator: BUMP_MAPPING Bump mapping is used. IMAGE_MAPPING Normal image mapping is used. Constructor &; Destructor Documentation SoTextureUnit::SoTextureUnit (void) Constructor. SoTextureUnit::~SoTextureUnit () [protected], [virtual] Destructor. Member Function Documentation SoType SoTextureUnit::getClassTypeId (void) [static] This static method returns the SoType object associated with objects of this class. Reimplemented from SoNode. SoType SoTextureUnit::getTypeId (void) const [virtual] Returns the type identification of an object derived from a class inheriting SoBase. This is used for run-time type checking and 'downward' casting. Usage example: void foo(SoNode * node) { if (node->getTypeId() == SoFile::getClassTypeId()) { SoFile * filenode = (SoFile *)node; // safe downward cast, knows the type } } For application programmers wanting to extend the library with new nodes, engines, nodekits, draggers or others: this method needs to be overridden in all subclasses. This is typically done as part of setting up the full type system for extension classes, which is usually accomplished by using the pre-defined macros available through for instance Inventor/nodes/SoSubNode.h (SO_NODE_INIT_CLASS and SO_NODE_CONSTRUCTOR for node classes), Inventor/engines/SoSubEngine.h (for engine classes) and so on. For more information on writing Coin extensions, see the class documentation of the toplevel superclasses for the various class groups. Implements SoBase. const SoFieldData ** SoTextureUnit::getFieldDataPtr (void) [static], [protected] This API member is considered internal to the library, as it is not likely to be of interest to the application programmer. Reimplemented from SoNode. const SoFieldData * SoTextureUnit::getFieldData (void) const [protected], [virtual] Returns a pointer to the class-wide field data storage object for this instance. If no fields are present, returns NULL. Reimplemented from SoFieldContainer. void SoTextureUnit::initClass (void) [static] Sets up initialization for data common to all instances of this class, like submitting necessary information to the Coin type system. Reimplemented from SoNode. void SoTextureUnit::doAction (SoAction *action) [virtual] This function performs the typical operation of a node for any action. Reimplemented from SoNode. void SoTextureUnit::callback (SoCallbackAction *action) [virtual] Action method for SoCallbackAction. Simply updates the state according to how the node behaves for the render action, so the application programmer can use the SoCallbackAction for extracting information about the scene graph. Reimplemented from SoNode. void SoTextureUnit::GLRender (SoGLRenderAction *action) [virtual] Action method for the SoGLRenderAction. This is called during rendering traversals. Nodes influencing the rendering state in any way or who wants to throw geometry primitives at OpenGL overrides this method. Reimplemented from SoNode. void SoTextureUnit::pick (SoPickAction *action) [virtual] Action method for SoPickAction. Does common processing for SoPickAction action instances. Reimplemented from SoNode. uint32_t SoTextureUnit::getMaxTextureUnit (void) [static] Returns the maximum number of texture units for the current GL context. Do not call this method if you don't have a current active GL context. You should also know that your OpenGL driver supports multi-texturing. This function is provided only to be compatible with TGS Inventor. It's better to use cc_glglue_max_texture_units() if you're using Coin (declared in Inventor/C/glue/gl.h). Member Data Documentation SoSFInt32 SoTextureUnit::unit The texture unit which will be used for texture nodes following this node in the traversal. Default value of the field is 0. SoSFEnum SoTextureUnit::mappingMethod The mapping method for this unit. Default is IMAGE_MAPPING. This field is not currently supported in Coin. It's included to support TGS' API. We might support the field in the future. Author Generated automatically by Doxygen for Coin from the source code. Version 3.1.3 Wed May 23 2012 SoTextureUnit(3)
All times are GMT -4. The time now is 10:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy