set -A arr a1 a2 a3 a4
# START
ssh -xq $Server1 -l $Username /usr/bin/ksh <<-EOS
integer j=0
for loop in ${arr}
do
printf "array - ${arr}\n"
(( j = j + 1 ))
j=`expr j+1`
done
EOS
# END
=========
this is not giving me correct output.
I... (5 Replies)
#! /bin/ksh
..(some lines are here..)
for t in (LIST)
do
a=function($t)
#here I want to wait till the function hangs for 5 secs else want to continue the loop for other values of t.
done
if ;then
.............
fi
......
......................
Suppose in this script;... (7 Replies)
Hi All,
I am comparing two strings inside an if condition if the strings are same then it should go inside the loop else it should execute code given in else part.
But there is a but inside my script
Even if the if condition is true
it is not going inside the loop also it is executing... (4 Replies)
I'm trying to understand if it's possible to create a set of variables that are numbered based on another variable (using eval) in a loop, and then call on it before the loop ends.
As an example I've written a script called question (The fist command is to show what is the contents of the... (2 Replies)
Hi,
In the code included below, the string comparision is not working fine. Please help
while (( find_out >= i ))
do
file=`head -$i f.out|tail -1`
dir=`dirname $file`
cd $dir
Status=""
if ; then
Status=`cvs -Q status... (3 Replies)
The string comparison highlighted below is not working fine. Please help:
while read line
do
# Get File name by deleting everything that preceedes and follows Filename as printed in cvs status' output
f_name=`echo $line | sed -e 's/^File://' -e 's/ *Status:.*//' | awk '{print $NF}'`
... (4 Replies)
I'm a beginner in shell scripting (I'm using ksh). I'm manipulating some files and I'm using set -A to transform each read line into a numeric array.
However, inside the 'for' loop the options of set (ie '-A') are not recognized (the vi editor doesn't highlight it and it doesn't work).
Where... (4 Replies)
I have a script that has to execute a read command in a function, this is in an ash busybox.
The code is...
trapcatch () { echo "Ctl-c Detected, what do you want to do?"
echo "Please choose the number of one of the following options"
echo "1. Jump past this Set"
echo "2. Exit... (8 Replies)
Hi All,
I am using geopts inside a function in shell script.
But it is doesnt seem to read the input args and I always gt empty value in o/p.
my code is
http://sparshmail.ad.infosys.com/owa/14.2.318.4/themes/base/pgrs-sm.gif
This message has not been sent.
#!/bin/ksh IFS=' '... (1 Reply)
Hi,
I am having script which contains many functions. Need to print each function name at the starting of the function. Like below,
functionname()
{
echo "functionname"
commands....
}
I've tried like below,
func=`grep "()" scriptname | cut -d "(" -f1`
for i in $func
do
nawk -v... (4 Replies)
Discussion started by: Sumanthsv
4 Replies
LEARN ABOUT OSX
trace
TRACE(1) BSD General Commands Manual TRACE(1)NAME
trace -- configure and record kernel trace events
SYNOPSIS
trace -h
trace -i [-b numbufs]
trace -g
trace -d [-a pid | -x pid]
trace -r
trace -n
trace -e [-c class [-p class] [-s subclass]] [-a pid | -x pid] [-k code | -k code | -k code | -k code]
trace -E [-c class [-p class] [-s subclass]] [-a pid | -x pid] [-k code | -k code | -k code | -k code] executable_path
[optional args to executable]
trace -t [-R rawfile] [-o OutputFilename] [-N] [ExtraCodeFilename1 ExtraCodeFilename2 ...]
DESCRIPTION
The trace command allows developers to initialize and configure the kernel trace subsystem. Trace events can be recorded to an in-memory buf-
fer, or logged directly to a file. Raw data files can later be decoded to a plaintext format.
SEE ALSO fs_usage(1), sc_usage(1), latency(1), top(1)Mac OS X October 28, 2010 Mac OS X