I want to pass an array in my function, And my function will be changing the elements of the array in the fuction, but it should not affect the values in my array variable of main function (1 Reply)
Hi,
If this is the array that is being returned to me:
How would I get the values for each of the 3 records?
This works for 1 Record:
foreach $item (@results)
{
($id, $id2, $name, $date, $email) = split(/\|/, $item, 5);
print "$name<br>";
} (2 Replies)
Hi,
I have an output generated from a shell script like;
0x41,0xF2,0x59,0xDD,0x86,0xD3,0xEF,0x61,0xF2
How can I pass this value to the C function, as below;
int main(int argc, char *argv) {
unsigned char hellopdu={above value};
}
Regards
Elthox (1 Reply)
Hi,.
I am writing a script to get the new files and split them.
Requirement
Find the new files under the path "/wload/scmp/app/data/OAS" (There are 5 sub folders).
Gunzip the files which are having .gz suffix.
Put the list of files in the filename in the format... (0 Replies)
Hi All,
the below is my requirement..
i need to split the file based on line and put that files in a array and need to access that files through loop finally i should send the files through mail..
how can we achieve this ..I am new to shell script please guide me..
I am using KSH..
... (11 Replies)
hi,
I have a array say
SAP_ARRAY="s1.txt"
SAP_ARRAY="s2.txt"
how can i pass this full array to a function.
here is the sample code i am using..
CHECK_NO_FILES()
{
FARRAY=$1
echo "FARRAY = $FARRAY"
echo "FARRAY = $FARRAY"
............... (5 Replies)
Hi, guys
I just wanted to sort the elements of an array ascendingly.
I know the following code does work well:
array=(13 435 8 23 100)
for i in {0..4}
do
j=$((i+1))
while ]
do
if } -le ${array} ]]
then :
else
min=${array}
${array}=${array}
${array}=$min
fi... (5 Replies)
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)
Hello,
I need to collect some statistical results from a series of files that are being generated by other software. The files are tab delimited. There are 4 different sets of statistics in each file where there is a line indicating what the statistic set is, followed by 5 lines of values. It... (8 Replies)
I'm able to read & print an array in varaible called "filelist"
I need to pass this array variable to a function called verify() and then read and loop through the passed array inside the function.
Unfortunately it does not print the entire array from inside the funstion's loop.
#/bin/ksh... (5 Replies)
Discussion started by: mohtashims
5 Replies
LEARN ABOUT DEBIAN
curses::widgets::progressbar
Widgets::ProgressBar(3pm) User Contributed Perl Documentation Widgets::ProgressBar(3pm)NAME
Curses::Widgets::ProgressBar - Progress Bar Widgets
MODULE VERSION
$Id: ProgressBar.pm,v 1.103 2002/11/03 23:40:04 corliss Exp corliss $
SYNOPSIS
use Curses::Widgets::ProgressBar;
$progress = Curses::Widgets::ProgessBar->({
CAPTION => 'Progress',
CAPTIONCOL => 'yellow',
LENGTH => 10,
VALUE => 0,
FOREGROUND => undef,
BACKGROUND => 'black',
BORDER => 1,
BORDERCOL => undef,
HORIZONTAL => 1,
X => 1,
Y => 1,
MIN => 0,
MAX => 100,
});
$progress->draw($mwh);
$progress->input(5);
See the Curses::Widgets pod for other methods.
REQUIREMENTS
Curses
Curses::Widgets
DESCRIPTION
Curses::Widgets::ProgressBar provides simplified OO access to Curses-based progress bar. Each object maintains it's own state information.
Note that this widget is designed for rendering, not interactive input. The application should update the the value of the bar by either
calling the input method, which will add the passed value to the widget's current value, or by setting the value directly via the setField
method.
METHODS
new (inherited from Curses::Widgets)
$progress = Curses::Widgets::ProgressBar->({
CAPTION => 'Progress',
CAPTIONCOL => 'yellow',
LENGTH => 10,
VALUE => 0,
FOREGROUND => undef,
BACKGROUND => 'black',
BORDER => 1,
BORDERCOL => undef,
HORIZONTAL => 1,
X => 1,
Y => 1,
MIN => 0,
MAX => 100,
});
The new method instantiates a new Progress Bar object. The only mandatory key/value pairs in the configuration hash are X and Y. All oth-
ers have the following defaults:
Key Default Description
============================================================
CAPTION undef Caption superimposed on border
CAPTIONCOL undef Foreground colour for caption text
LENGTH 10 Number of columns for the bar
VALUE 0 Current value
FOREGROUND undef Default foreground colour
BACKGROUND undef Default blackground colour
BORDER 1 Display border around the set
BORDERCOL undef Foreground colour for border
HORIZONTAL 1 Horizontal orientation for bar
MIN 0 Low value for bar (0%)
MAX 100 High vlaue for bar (100%)
Setting the value will change the length of the bar, based on the bounds set with MIN and MAX. The CAPTION is only rendered on the border
of a horizontal progress bar.
draw
$progress->draw($mwh);
The draw method renders the progress bar in its current state. This requires a valid handle to a curses window in which it will render
itself.
input
$progress->input(5);
The argument is added to the progress bar's current value.
HISTORY
2001/07/05 -- First implementation
AUTHOR /COPYRIGHT
(c) 2001 Arthur Corliss (corliss@digitalmages.com)
perl v5.8.8 2006-09-14 Widgets::ProgressBar(3pm)