#!/bin/ksh
c=0
while [[ ! -f /tmp/unex && $c -lt 10 ]]; do
echo /tmp/unex NOT found, iter : $c;
((c = $c + 1));
sleep 2;
done
(note that ksh is in /bin instead of /usr/bin on my system) and the file /tmp/unex does not exist; I get the output:
Code:
/tmp/unex NOT found, iter : 0
/tmp/unex NOT found, iter : 1
/tmp/unex NOT found, iter : 2
/tmp/unex NOT found, iter : 3
/tmp/unex NOT found, iter : 4
/tmp/unex NOT found, iter : 5
/tmp/unex NOT found, iter : 6
/tmp/unex NOT found, iter : 7
/tmp/unex NOT found, iter : 8
/tmp/unex NOT found, iter : 9
Hello everyone,
how can I send output to the screen from a running script or tcl, in such a way that if a loop is executing I will see the rolling counter on my screen as the records are processed in the loop. I do not want the screen to scroll, though. In other words can a var's value be painted... (2 Replies)
The scenario is like this :
I need to read records from a file one by one and increment counter1, if a certain field matches with a number say "40"..the script should increment the counter2 and also extract a corresponding field from the same line and adding them one by one and redirecting the the... (5 Replies)
Hi,
hope I am posting in the right section.
My problem is that I have 2 or more arguments passed and I want to check if the arguments passed exists or not.
The first argument should not exist and the remaining others should exist.
example:
./shells.sh argument1 argument2 argument3
... (5 Replies)
Hello Everyone,
I'm in need of assistance on creating a script with a counter on a certain string.
Basically this script opens a log file and displays certain log data. There are two key words in the log. START and FINISH. In between the START and FINISH is a variable ACTNUMBER. It will... (1 Reply)
hello,
File 1
main Group sub group
MIT VAR_1D_DATA_TYPE 23-03-2012
MIT VAR_1D_DATA_TYPE 22-03-2012
MIT VAR_10D_DATA_TYPE 23-03-2012
MIT VAR_10D_DATA_TYPE 22-03-2012
MIT ... (0 Replies)
I want to run my shell script to the limit number.Suppose I know in advance that MAX=5 then I want that my script run 5 times only.Something like below$ vi testingMAX=5COMMAND="ssh -l stpuser VHLDVWSAD001 /projects/st/utils/deploy/deployall.sh >/dev/null 2>&1 &" ; sleep 20;count=0while... (2 Replies)
Hi,
I am working on a script where I need to add one functionality i.e. to could the number of tar files at particular location...but the script is working in below way.
1) create sandbox
2) Drop old member function
3) addmember function
4) Apply checkpoint lable
5) Resync operation(This... (1 Reply)
Hi friends, I just want to try some thing with shell using loop and counter
I have 30 Directory, in each directory number of files say 5, 10, 20 etc...
directory_1
directory_2
directory_n
what I want to do is read files from directory_1 say 5 files
if my counter is like this
m=2000 ... (6 Replies)
Hello,
I have currently coded a bash script below in which it does the following:
# Archives compressed file from another location.
Basically it moves *.gz files to another location.
The script also sends an email whenever a new compressed file is placed. This is the issue that i... (5 Replies)
Hi!
Can anyone explain this? The counter CDR_count should go on forever, but it suddenly resets at every step of the FOR loop (I know this because $_file has exactly 378 records). However, the counter reset is OUTSIDE the FOR loop. What's going on??
#!/bin/bash
if || ; then
echo
... (8 Replies)
Discussion started by: Flavius
8 Replies
LEARN ABOUT NETBSD
prop_object_iterator_next
PROP_OBJECT(3) BSD Library Functions Manual PROP_OBJECT(3)NAME
prop_object, prop_object_retain, prop_object_release, prop_object_type, prop_object_equals, prop_object_iterator_next,
prop_object_iterator_reset, prop_object_iterator_release -- general property container object functions
LIBRARY
Property Container Object Library (libprop, -lprop)
SYNOPSIS
#include <prop/proplib.h>
void
prop_object_retain(prop_object_t obj);
void
prop_object_release(prop_object_t obj);
prop_type_t
prop_object_type(prop_object_t obj);
bool
prop_object_equals(prop_object_t obj1, prop_object_t obj2);
prop_object_t
prop_object_iterator_next(prop_object_iterator_t iter);
void
prop_object_iterator_reset(prop_object_iterator_t iter);
void
prop_object_iterator_release(prop_object_iterator_t iter);
DESCRIPTION
The prop_object family of functions operate on all property container object types.
prop_object_retain(prop_object_t obj)
Increment the reference count on an object.
prop_object_release(prop_object_t obj)
Decrement the reference count on an object. If the last reference is dropped, the object is freed.
prop_object_type(prop_object_t obj)
Determine the type of the object. Objects are one of the following types:
PROP_TYPE_BOOL Boolean value (prop_bool_t)
PROP_TYPE_NUMBER Number (prop_number_t)
PROP_TYPE_STRING String (prop_string_t)
PROP_TYPE_DATA Opaque data (prop_data_t)
PROP_TYPE_ARRAY Array (prop_array_t)
PROP_TYPE_DICTIONARY Dictionary (prop_dictionary_t)
PROP_TYPE_DICT_KEYSYM Dictionary key symbol (prop_dictionary_keysym_t)
If obj is NULL, then PROP_TYPE_UNKNOWN is returned.
prop_object_equals(prop_object_t obj1, prop_object_t obj2)
Returns true if the two objects are of the same type and are equivalent.
prop_object_iterator_next(prop_object_iterator_t iter)
Return the next object in the collection (array or dictionary) being iterated by the iterator iter. If there are no more objects in the
collection, NULL is returned.
prop_object_iterator_reset(prop_object_iterator_t iter)
Reset the iterator to the first object in the collection being iterated by the iterator iter.
prop_object_iterator_release(prop_object_iterator_t iter)
Release the iterator iter.
SEE ALSO prop_array(3), prop_bool(3), prop_data(3), prop_dictionary(3), prop_number(3), prop_string(3), proplib(3)HISTORY
The proplib property container object library first appeared in NetBSD 4.0.
BSD August 21, 2006 BSD