07-18-2013
Without samples it's difficult to guess what you want to do. How about removing the $-signs from awkcolist, splitting it into an array, and using a for loop to run through the array elements to construct your x variable?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I'm running some encrypted data through a script I wrote. In order to do this, I'm using eval to resolve some of my variables. At the moment, when I use eval to resolve, it strips out some of my encrypted values, and totally drops some others. For example if I have the value ab1"3 it drops... (1 Reply)
Discussion started by: Khoomfire
1 Replies
2. Shell Programming and Scripting
I am trying to expand the variable $user in my alias command and tried
several variations of eval but can't seem to get it to work.
The end result should be either:
oracle_user='sudo su - oracle ' or oracle_user='sudo su - oracle1 '
user=$(grep '^oracle:' /etc/passwd | cut... (5 Replies)
Discussion started by: BeefStu
5 Replies
3. Shell Programming and Scripting
hi all,
Am trying to add some code to a ksh script and i dont understand how an eval function is used :
_var=$1
_conceal=$2
eval _val=\$${_var}
can someone shed some light on what the eval function in the above context means/does ??
thanks. (4 Replies)
Discussion started by: cesarNZ
4 Replies
4. Shell Programming and Scripting
Hi all,
some small script with eval turned me to crazy.
my OS is linux
Linux s10-1310 2.6.16.53-0.8.PTF.434477.3.TDC.0-smp #1 SMP Fri Aug 31 06:07:27 PDT 2007 x86_64 x86_64 x86_64 GNU/Linux
below script works well
#!/bin/bash
eval ssh remotehost date
eval ssh remotehost ls
below... (1 Reply)
Discussion started by: summer_cherry
1 Replies
5. Shell Programming and Scripting
Hello All,
Since my variables are nested I use eval to populate the data.
I have an ambiguity here when eval is used along with &
say I have the below variable
url="www.unix.com" , this come from function call as argument.
I want to take this into another variable say... (6 Replies)
Discussion started by: sathyaonnuix
6 Replies
6. Shell Programming and Scripting
anyone has any info on why this is complaining???
vivek@vivek-c5e55ef2e ~/TAC
$ zoneCounter=1
vivek@vivek-c5e55ef2e ~/TAC
$ optUsage1=23%
vivek@vivek-c5e55ef2e ~/TAC
$ eval eval echo "<th>Zone $zoneCounter </th><th align=\"left\"> \$optUsage$zoneCounter </th>"
-bash: syntax error... (1 Reply)
Discussion started by: vivek d r
1 Replies
7. Shell Programming and Scripting
anyone has any info on why this is complaining???
vivek@vivek-c5e55ef2e ~/TAC
$ zoneCounter=1
vivek@vivek-c5e55ef2e ~/TAC
$ optUsage1=23%
vivek@vivek-c5e55ef2e ~/TAC
$ eval eval echo "<th>Zone $zoneCounter </th><th align=\"left\"> \$optUsage$zoneCounter </th>"
-bash: syntax error... (13 Replies)
Discussion started by: vivek d r
13 Replies
8. Shell Programming and Scripting
thank you (35 Replies)
Discussion started by: ratnalein88
35 Replies
9. Shell Programming and Scripting
Hi everyone,
The following piece of awk code works fine if I use eval builtin
var='$1,$2'
ps | eval "awk '{print $var}'"
But when I try to knock off eval and use awk variable as substitute then I am not getting the expected result
ps | awk -v v1=$var '{print v1}' # output is $1,$2
ps |... (4 Replies)
Discussion started by: royalibrahim
4 Replies
10. Shell Programming and Scripting
I want to do 2 things in single line that is evaluating a command to get return code and store $2 of awk if the command exit code is 0.
eval "ade desc ${filename}@@/<branch_name> | grep Version | awk '{print $2}' 2>&1 1>/dev/null"
ret=$?
echo "$ret $val"
if
then
... (3 Replies)
Discussion started by: ezee
3 Replies
LEARN ABOUT CENTOS
slarra
slarra.f(3) LAPACK slarra.f(3)
NAME
slarra.f -
SYNOPSIS
Functions/Subroutines
subroutine slarra (N, D, E, E2, SPLTOL, TNRM, NSPLIT, ISPLIT, INFO)
SLARRA computes the splitting points with the specified threshold.
Function/Subroutine Documentation
subroutine slarra (integerN, real, dimension( * )D, real, dimension( * )E, real, dimension( * )E2, realSPLTOL, realTNRM, integerNSPLIT,
integer, dimension( * )ISPLIT, integerINFO)
SLARRA computes the splitting points with the specified threshold.
Purpose:
Compute the splitting points with threshold SPLTOL.
SLARRA sets any "small" off-diagonal elements to zero.
Parameters:
N
N is INTEGER
The order of the matrix. N > 0.
D
D is REAL array, dimension (N)
On entry, the N diagonal elements of the tridiagonal
matrix T.
E
E is REAL array, dimension (N)
On entry, the first (N-1) entries contain the subdiagonal
elements of the tridiagonal matrix T; E(N) need not be set.
On exit, the entries E( ISPLIT( I ) ), 1 <= I <= NSPLIT,
are set to zero, the other entries of E are untouched.
E2
E2 is REAL array, dimension (N)
On entry, the first (N-1) entries contain the SQUARES of the
subdiagonal elements of the tridiagonal matrix T;
E2(N) need not be set.
On exit, the entries E2( ISPLIT( I ) ),
1 <= I <= NSPLIT, have been set to zero
SPLTOL
SPLTOL is REAL
The threshold for splitting. Two criteria can be used:
SPLTOL<0 : criterion based on absolute off-diagonal value
SPLTOL>0 : criterion that preserves relative accuracy
TNRM
TNRM is REAL
The norm of the matrix.
NSPLIT
NSPLIT is INTEGER
The number of blocks T splits into. 1 <= NSPLIT <= N.
ISPLIT
ISPLIT is INTEGER array, dimension (N)
The splitting points, at which T breaks up into blocks.
The first block consists of rows/columns 1 to ISPLIT(1),
the second of rows/columns ISPLIT(1)+1 through ISPLIT(2),
etc., and the NSPLIT-th consists of rows/columns
ISPLIT(NSPLIT-1)+1 through ISPLIT(NSPLIT)=N.
INFO
INFO is INTEGER
= 0: successful exit
Author:
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date:
September 2012
Contributors:
Beresford Parlett, University of California, Berkeley, USA
Jim Demmel, University of California, Berkeley, USA
Inderjit Dhillon, University of Texas, Austin, USA
Osni Marques, LBNL/NERSC, USA
Christof Voemel, University of California, Berkeley, USA
Definition at line 136 of file slarra.f.
Author
Generated automatically by Doxygen for LAPACK from the source code.
Version 3.4.2 Tue Sep 25 2012 slarra.f(3)