Hi all,
In windows script, passing arguments can be done in both "call by value" and
"call by reference". Refer
http://www.commandline.co.uk/lib/treeview/index.php
Can we have call by reference in unix too?
Thanks in adavance,
Sonal. (5 Replies)
Hi,
I have a master BASH shell script where I define a bunch of variables:
$var1=why
$var2=is
$var3=(this so hard)
I would then like to call another shell script and pass these variables to it:
$script2 $var1 $var2 $var3
This works fine for var1 and var2. However, var3 is an array,... (9 Replies)
Hello,
Please tell me if there is a better way to get the number of elements from an array that is passed to a function.
This is what works on Solaris 8 (ksh) but it looks odd:
loop_array() {
array_name=$2
b1='\${\#'
b2='}'
nr_elements=`eval echo... (6 Replies)
Hi experts,
I am here again with another Issue.
I need to pass the array as parameter / argument to another script.
I tried it as follows . ( I got this idea from the link )
$ cat test1.sh
#! /usr/bin/ksh
set -a arr1
echo "...In Test1...."
arr1="APPS_DEV"
arr1="TEST_DEV"
echo... (16 Replies)
Let me know if there is a way to pass array to a funtion in ksh script.
function isPresent
{
typeset member
member=$1
dbList=$2
echo '$1:' $1
echo '$2' $dbList
The array will be at the second position....something like this
isPresent 12 <array>
if
then
echo... (3 Replies)
Hi ,
I have a script which is using a text file as I/P.
I want a code where it reads n lines from this file and pass the parameters to a function and now this script should run in such a way where a function can be called in parallel with different parameters. Please find below my script, it... (1 Reply)
I have a question on how can I assign a output of a function to a variable which is executed in background.
Here is my example
$ cat sample_program.sh
#!/bin/ksh
exec_func () {
sleep 1
v=`expr $1 + 100`
print $v
}
export OUT_ARR
date
for i in 1 2
do
OUT_ARR=`exec_func $i` &... (1 Reply)
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)
Hi,
I am creating filesystem for block device, but I want to pass array value one by one acording to block device count.
$tmp1 = block device count 3
$blockdevice =
So I want to first pass sdb1 alone in loop, how to take only block device seprately from $blockdevice array. (1 Reply)
Hello,
I think there's an easier way to do this but can't seem to recall but given an array of animals and an initial value is a random index in the array, here it's 3.
3,4,5,4,3,2,1,0,1,2,3,4,5,4,3,2,1,0... inifinite repeat
a quick brute force solution i came up with was two functions, i... (6 Replies)
Discussion started by: f77hack
6 Replies
LEARN ABOUT CENTOS
error::pass4
ERROR::PASS4(7stap)ERROR::PASS4(7stap)NAME
error::pass4 - systemtap pass-4 errors
DESCRIPTION
Errors that occur during pass 4 (compilation) have generally only a few causes:
kernel or OS version changes
The systemtap runtime and embedded-C fragments in the tapset library are designed to be portable across a wide range of OS versions.
However, incompatibilities can occur when some OS changes occur, such as kernel modifications that change functions, types, or
macros referenced by systemtap. Upstream builds of systemtap are often quickly updated to include relevant fixes, so try getting or
making an updated build. If the issue persists, report the problem to the systemtap developers.
buggy embedded-C code
Embedded-C code in your own guru-mode script cannot be checked by systemtap, and is passed through verbatim to the compiler. Errors
in such snippets of code may be found during the pass-4 compiler invocation, though may be hard to identify by the compiler errors.
incompatible embedded-C code
The interface standards between systemtap-generated code and embedded-C code occasionally change. For example, before version 1.8,
arguments were passed using macros THIS->foo and THIS->__retvalue but from version 1.8 onward, using STAP_ARG_foo and STAP_RETVALUE.
Adjust your embedded-C code to current standards, or use the stap --compatible=VERSION option to make systemtap use a different one.
GATHERING MORE INFORMATION
It may be necessary to run systemtap with -k or -p3 to examine the generated C code. Increasing the verbosity of pass-4 with an option
such as --vp 0001 can also help pinpoint the problem.
SEE ALSO stap(1),
error::reporting(7stap)ERROR::PASS4(7stap)