Sponsored Content
Full Discussion: Escaping a variable in ksh
Top Forums UNIX for Beginners Questions & Answers Escaping a variable in ksh Post 303032594 by jeffs42885 on Wednesday 20th of March 2019 05:14:32 PM
Old 03-20-2019
Your first approximation worked!

Thank you!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ksh: A part of variable A's name is inside of variable B, how to update A?

This is what I tried: vara=${varb}_count (( vara += 1 )) Thanks for help (4 Replies)
Discussion started by: pa3be
4 Replies

2. Shell Programming and Scripting

ksh - get stdout name as variable

Writing a ksh script. If someone starts a process with: test.ksh > date.log How can I grab 'date.log' name as a variable in test.ksh? I need to get the 'date.log' name (not the contents) as a variable...without entering something like 'test.ksh date.log > date.log' (4 Replies)
Discussion started by: mhcueball2
4 Replies

3. Shell Programming and Scripting

KSH variable substitution

Hi folks Please let me know if anyone knows how to handle this. My KSH script -> testscript.ksh cmd=$1 ENV="devl" echo $cmd This is how I call the script ./testscript.ksh 'ps -ef | grep br$ENV' How do I get this to print the below text i.e $ENV should be substituted with the value... (5 Replies)
Discussion started by: tipsy
5 Replies

4. Shell Programming and Scripting

problem escaping newline in ksh

Hi, I did the below. $ print "\\n" $ I am curious, why does \\n give two new lines? I would have thought that the first \ would escape the second \, and so we'd get \n printed. But we didn't. Any ideas? Thanks. (7 Replies)
Discussion started by: JamesByars
7 Replies

5. Shell Programming and Scripting

Escaping the * character in ksh.

Hi All, In ksh script i'm trying to assign "sqlstmt1" varaible value, update VAREntryTb set VAR10num = VAR1num * Mltplr where BusD = '$val1' and RunI = 1"` Hence i wrote below statement, the issue with this is shell is expanding "*" character adn thus subistuting it with the content of my... (6 Replies)
Discussion started by: arvindcgi
6 Replies

6. Shell Programming and Scripting

checking variable has value - ksh

hi all, i have a shell (ksh) script where i am reading line by line from a grep command and i wanted to check if the grep command actually returned something or was null. i can do this by using -z : if ; then ..... but this forces me to do something when $myVariable is null when i... (3 Replies)
Discussion started by: cesarNZ
3 Replies

7. UNIX for Dummies Questions & Answers

Question on using a variable in KSH

Hi all, The below command tries to copy ".tgz" instead of "hello_test.tgz" -- It seems as if the underscore gets in the way. I tried with different ways of using quotes, with no luck, unfortunately...it's probably very simple, but may I ask how this would be done: How would the below be... (3 Replies)
Discussion started by: chatguy
3 Replies

8. Shell Programming and Scripting

setting variable value to dynamic sed match - escaping hell

Hello All, I'm trying to write a script that will perform a dynamic match (of a dynamic variable) and set a variable to have the resulting (match) value. The idea is that the environment variable to check ($1) and the regular expression to use ($2) are given as parameters. For example,... (5 Replies)
Discussion started by: aedgar
5 Replies

9. Shell Programming and Scripting

Variable to command to Variable Question KSH

Hello, First post for Newbie as I am stumped. I need to get certain elements for a specific PID from the ps command. I am attempting to pass the value for the PID I want to retrieve the information for as a variable. When the following is run without using a variable, setting a specific PID,... (3 Replies)
Discussion started by: Coyote270WSM
3 Replies

10. Shell Programming and Scripting

sed - replacement file path with variable - Escaping / character

Hi,, I have the line below in a file: $!VarSet |LFDSFN1| = '"E:\APC\Trials\20140705_427_Prototype Trial\Data\T4_20140705_Trial_Cycle_Data_13_T_Norm.txt" "VERSION=100 FILEEXT=\"*.txt\" FILEDESC=\"General Text\" "+""+"TITLE{SEARCH=NONE NAME=\"New Dataset\" LINE=1I want to write a script to change... (2 Replies)
Discussion started by: carlr
2 Replies
PLGRIDDATA(3plplot)						    PLplot API						       PLGRIDDATA(3plplot)

NAME
plgriddata - Grid data from irregularly sampled data SYNOPSIS
plggriddata(x, y, z, npts, xg, nptsx, yg, nptsy, zg, type, data) DESCRIPTION
Real world data is frequently irregularly sampled, but all PLplot 3D plots require data placed in a uniform grid. This function takes irregularly sampled data from three input arrays x[npts], y[npts], and z[npts], reads the desired grid location from input arrays xg[nptsx] and yg[nptsy], and returns the gridded data into output array zg[nptsx][nptsy]. The algorithm used to grid the data is specified with the argument type which can have one parameter specified in argument data. Redacted form: General: plgriddata(x, y, z, xg, yg, zg, type, data) Perl/PDL: Not available? This function is used in example 21. ARGUMENTS
x (PLFLT *, input) The input x array. y (PLFLT *, input) The input y array. z (PLFLT *, input) The input z array. Each triple x[i], y[i], z[i] represents one data sample coordinate. npts (PLINT, input) The number of data samples in the x, y and z arrays. xg (PLFLT *, input) The input array that specifies the grid spacing in the x direction. Usually xg has nptsx equally spaced values from the minimum to the maximum values of the x input array. nptsx (PLINT, input) The number of points in the xg array. yg (PLFLT *, input) The input array that specifies the grid spacing in the y direction. Similar to the xg parameter. nptsy (PLINT, input) The number of points in the yg array. zg (PLFLT **, output) The output array, where data lies in the regular grid specified by xg and yg. the zg array must exist or be allocated by the user prior to the call, and must have dimension zg[nptsx][nptsy]. type (PLINT, input) The type of gridding algorithm to use, which can be: GRID_CSA: Bivariate Cubic Spline approximation GRID_DTLI: Delaunay Triangula- tion Linear Interpolation GRID_NNI: Natural Neighbors Interpolation GRID_NNIDW: Nearest Neighbors Inverse Distance Weighted GRID_NNLI: Nearest Neighbors Linear Interpolation GRID_NNAIDW: Nearest Neighbors Around Inverse Distance Weighted For details of the algorithms read the source file plgridd.c. data (PLFLT, input) Some gridding algorithms require extra data, which can be specified through this argument. Currently, for algorithm: GRID_NNIDW, data specifies the number of neighbors to use, the lower the value, the noisier (more local) the approximation is. GRID_NNLI, data specifies what a thin triangle is, in the range [1. .. 2.]. High values enable the usage of very thin triangles for interpolation, possibly resulting in error in the approximation. GRID_NNI, only weights greater than data will be accepted. If 0, all weights will be accepted. 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 PLGRIDDATA(3plplot)
All times are GMT -4. The time now is 11:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy