Sponsored Content
Full Discussion: Set variable with variable
Top Forums Shell Programming and Scripting Set variable with variable Post 302397418 by wxornot on Monday 22nd of February 2010 05:48:30 AM
Old 02-22-2010
two dimensional

I have not used two dimensional arrays before. I will look into it. thanks,

Dave
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Export command giving Variable Name vs the Value set for the Variable

I'm having an issue when I export within my program. I'm getting the variable name, not the variable value. I have a configuration file (config.txt) that has the values of the variables set as so: set -a export ARCHIVEPOSourceDir="/interfaces/po/log /interfaces/po/data" export... (2 Replies)
Discussion started by: ParNone
2 Replies

2. Linux

How do i set environment variable

Hi, I am quite new to Linux. And I have doubt how to set new environment variable with value to a C executable. Let say I have a environment variable $Hack ; I would like to load a value for this variable; so that when the C executable is executed, the $Hack would set the variable value. ... (4 Replies)
Discussion started by: ahjiefreak
4 Replies

3. Shell Programming and Scripting

set variable with another variable? c shell

okay, this shouldn't be difficult but I can't figure it out. How can I set a variable with another variable. I have the following: foreach pe ($dir $sp) set tpe = `echo $pe | grep M` if ($tpe == M) then set ${$pe} = M <--- This doesn't work else endif end In this case what... (2 Replies)
Discussion started by: wxornot
2 Replies

4. Shell Programming and Scripting

global variable not being set

In ksh I thought a global variable was any variable in a script or function that did not have the typeset command. I have a global in my calling script which I increment in a function, but the value does not change in the calling script. Here is the code: function f_open_log { typeset -r... (5 Replies)
Discussion started by: robotball
5 Replies

5. Shell Programming and Scripting

set variable in while loop?

Dear All, Can anyone advise why this script isn't run as expected? =========================== status=0 cat /etc/passwd | while read line; do status=1 done echo $status =========================== it always return 0 , but not 1. why? anything wrong? Thanks. (1 Reply)
Discussion started by: tiger2000
1 Replies

6. Shell Programming and Scripting

set a variable with a variable name

Hi there, I can display a variable with a variable name: localhost:~# a=1 localhost:~# b=a localhost:~# echo $b a localhost:~# echo ${!b} 1 But how can I set a variable with a variable name? In the following example, I want to set a = 1: localhost:~# b=a localhost:~# $b=1 -bash:... (10 Replies)
Discussion started by: chebarbudo
10 Replies

7. UNIX for Dummies Questions & Answers

How to set a variable with a count variable i.e. VARIABLE$COUNT

Hi All I've very nearly finished this script I'm working on but have hit another idiots problem, after googling I can't see a solution for this one. I have a while count loop that checks checks two consecutive values then increments the count by two. What the script has to do is then check... (5 Replies)
Discussion started by: Bashingaway
5 Replies

8. HP-UX

What is the use of command set -- and set - variable?

Hi, I am using hp unix i want to know the use of the following commands set -- set - variable thanks (4 Replies)
Discussion started by: gomathi
4 Replies

9. Shell Programming and Scripting

How to know who and where a variable is set ?

hi, i'm not a root user and i want to know which user and in which file is loaded a variable seen in the "env" display ? I will use this variable but i want to be sure that it will be a permanent variable ! i don't see it in my files (.profile , kshrc...) and neither in /etc/profile. ... (3 Replies)
Discussion started by: Nicol
3 Replies

10. Shell Programming and Scripting

do you have a better way to set this variable?

greetings, i have a variable $input that i want to use to set $output. $input is /dir/filename.mph and $input is passed to my script that i manipulate it as follows: input=`basename $input`i want the $output to be filename_solved.mph, basically stuffing "_solved" in the filename. here's how i... (2 Replies)
Discussion started by: crimso
2 Replies
PLVECT(3plplot) 						    PLplot API							   PLVECT(3plplot)

NAME
plvect - Vector plot SYNOPSIS
plvect(u, v, nx, ny, scale, pltr, pltr_data) DESCRIPTION
Draws a vector plot of the vector (u[nx][ny],v[nx][ny]). The scaling factor for the vectors is given by scale. A transformation routine pointed to by pltr with a pointer pltr_data for additional data required by the transformation routine is used to map indices within the array to the world coordinates. The style of the vector arrow may be set using plsvect(3plplot). Redacted form: plvect(u, v, scale, pltr, pltr_data) This function is used in example 22. ARGUMENTS
u, v (PLFLT **, input) Pointers to a pair of vectored two-dimensional arrays containing the x and y components of the vector data to be plotted. nx, ny (PLINT, input) Physical dimensions of the arrays u and v. scale (PLFLT, input) Parameter to control the scaling factor of the vectors for plotting. If scale = 0 then the scaling factor is automatically calcu- lated for the data. If scale < 0 then the scaling factor is automatically calculated for the data and then multiplied by -scale. If scale > 0 then the scaling factor is set to scale. pltr (void (*) (PLFLT, PLFLT, PLFLT *, PLFLT *, PLPointer) , input) Pointer to function that defines transformation between indices in array z and the world coordinates (C only). Transformation func- tions are provided in the PLplot library: pltr0(3plplot) for identity mapping, and pltr1(3plplot) and pltr2(3plplot) for arbitrary mappings respectively defined by one- and two-dimensional arrays. In addition, user-supplied routines for the transformation can be used as well. Examples of all of these approaches are given in the PLplot documentation. The transformation function should have the form given by any of pltr0(3plplot), pltr1(3plplot), or pltr2(3plplot). pltr_data (PLPointer, input) Extra parameter to help pass information to pltr0(3plplot), pltr1(3plplot), pltr2(3plplot), or whatever routine that is externally supplied. AUTHORS
Geoffrey Furnish and Maurice LeBrun wrote and maintain PLplot. This man page was automatically generated from the DocBook source of the PLplot documentation, maintained by Alan W. Irwin and Rafael Laboissiere. SEE ALSO
PLplot documentation at http://plplot.sourceforge.net/resources. August, 2012 PLVECT(3plplot)
All times are GMT -4. The time now is 05:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy