02-10-2008
Resolved.... Thank you
otheus,
Thank you so much, this was driving me nuts wondering why it was occuring.
I was not sure how to go about the double loop when I coded this ,at the time all I knew was that if the parameter needed changing I had to call the function again.
The Double loop works nicely. thank you
so Bottom line here is I should not call Function (A) while in Function A.
I am off to fix my Slop .......
![Smilie Smilie](https://www.unix.com/images/smilies/smile.gif)
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I need a unix script that check for even or odd. EXAMPLE::::
please enter the number to check: 12
the output: This is an even number
it has to have prompts. (2 Replies)
Discussion started by: snyper2k2
2 Replies
2. HP-UX
Hi, We have some troubles with our HP server (rx4640) running HP-UX 11.31. The server is attached to a JBod cabinet. If the JBod cabinet is powered on and we power on the server after then HP-UX can't find the devices (disks) at the cabinet. Does not help to run an ioscan -fnC disk. But if I power... (3 Replies)
Discussion started by: hoff
3 Replies
3. Shell Programming and Scripting
Is it normal behavior for a shell script that terminates to terminate its parent shell when executed with the "." option?
For example, if I have the example script (we'll name it ex.sh):
#!/bin/sh
if
then
echo "Bye."
exit 2
fi
And I execute it like this:
>./ex.sh
It... (6 Replies)
Discussion started by: DreamWarrior
6 Replies
4. Shell Programming and Scripting
The code I am using
#!/bin/sh
for FILE in *.cfg; do
awk '{
print;
if ($1 == "host_name") store_name = $2;
if ($1 == "register") { printf("\t\t parents\t\t\t %s-ilo\n", store_name); }
}' "$FILE" > ../new-files/hosts/$FILE
sed -i -e "s/notification_options.*/notification_options... (0 Replies)
Discussion started by: jag7720
0 Replies
5. Shell Programming and Scripting
I am creating a startup script for an application. This application's startup script is in bash. It will also need to call a perl script (which I will not be able to modify) for the application environment prior to calling the application. The problem is that this perl script creates a new shell... (5 Replies)
Discussion started by: leepet01
5 Replies
6. Shell Programming and Scripting
Hi folks,
So I wrote a script to run "top", "awk" out values fro the "top" and send the results to a data file.
I then set it to run in cron every 15 minutes.
Now I'm noticing that the script, and it's sub-commands are not always cleanly finishing and, in my investigations, I am also... (11 Replies)
Discussion started by: Marc G
11 Replies
7. What is on Your Mind?
Hello,
I often stumble over a common shell coding practise.
Example 1:
#!/bin/sh
#
# Licensed Materials - Property of IBM
# Rational ClearCase
# (C) Copyright IBM Corp. 1999, 2010. All Rights Reserved
# US Government Users Restricted Rights -
# Use, duplication or disclosure restricted... (4 Replies)
Discussion started by: MadeInGermany
4 Replies
8. Programming
Some background:
The application normally runs on an embedded platform. Currently, for development purposes, I have the rootfs located @ /exports and the target is communicating over NFS. That way I can make a change on my local system, save the application @ /exports, and run the altered... (4 Replies)
Discussion started by: Circuits
4 Replies
9. Cybersecurity
Hi Folks,
Before I go off and start checking I'm just wondering if anyone has seen this behaviour before.
# passwd e825390
Changing password for user e825390.
New password:
Retype new password:
Retype new password:
passwd: all authentication tokens updated successfully.
As you can... (2 Replies)
Discussion started by: gull04
2 Replies
LEARN ABOUT DEBIAN
net::sip::nathelper::server
Net::SIP::NATHelper::Server(3pm) User Contributed Perl Documentation Net::SIP::NATHelper::Server(3pm)
NAME
Net::SIP::NATHelper::Server - server for Net::SIP::NATHelper::Client
DESCRIPTION
This module is a wrapper around Net::SIP::NATHelper::Base and will receive it's instructions from Net::SIP::NATHelper::Client using RPC via
sockets.
CONSTRUCTOR
new ( [ HELPER ], @FDS )
Will create an object which listens on all file descriptors given in FDS for RPC from clients.
If HELPER is given and a Net::SIP::NATHelper::Base object or derived it will be used, otherwise the helper will be created.
METHODS
do_command ( FD )
Called when FD is available for reading. Calls accept on FD and reads the RPC packet from the resulting file descriptor, executes it
and returns result back.
Currently implemented commands are "allocate","activate" and "close" which will map to the local methods allocate_sockets,
activate_session and close_session.
One might redefine or add commands by changing "$self->{commands}". The key of this hash reference is the command name and the value
is the callback.
Unknown commands will be ignored, e.g nothing returned.
loop
This will loop over all file descriptors it gets from callbacks in Net::SIP::NATHelper::Base and the file descriptors for the RPC
sockets.
When file descriptors gets available for reading it will execute the callbacks, e.g. forward the RTP data or call do_command. In
regular intervals it will call expire from Net::SIP::NATHelper::Base to expire the RTP sockets and sessions.
allocate_sockets ( ... )
Calls allocate_sockets of the local Net::SIP::NATHelper::Base object. Takes and returns the same arguments.
activate_session ( ... )
Calls activate_session of the local Net::SIP::NATHelper::Base object. Takes the same arguments and returns 1 if the session was newly
activated, -1 if it was activated before and false if activation failed. Updates callbacks into the event loop.
close_session ( ... )
Calls activate_session of the local Net::SIP::NATHelper::Base object. Takes the same arguments and returns the number of closed
sessions. Updates callbacks into the event loop.
expire ( ... )
Calls expire of the local Net::SIP::NATHelper::Base object. Takes the same arguments and returns the number of expired sessions.
Updates callbacks into the event loop if necessary.
BUGS
The local event loop should be pluggable, so that other implementations could be used. Right now it's a hard coded loop using select.
perl v5.14.2 2009-01-23 Net::SIP::NATHelper::Server(3pm)