10-15-2007
Thank you. I did not see this in the reference material I reviewed.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i have this code for a simple if loop:
#!/bin/bash
array="1 2 3 4 5"
array2="5 6 7 8 9"
if } -gt ${array} ]; then
echo "${array2} is greater than ${array}!!"
fi
the error is
./script8: line 9: [: too many arguments
./script8: line 9: [: too many arguments
./script8: line 9: [:... (10 Replies)
Discussion started by: npatwardhan
10 Replies
2. Shell Programming and Scripting
Hi
I have a sample MKS Korn Shell script, it is working fine when I am executing manually (i.e command prompt) but not when schedule through scheduler.
here is the script, ls command working just fine manual run, so I thought it could be environment varilable so kept same PATH when running... (1 Reply)
Discussion started by: rkthoka
1 Replies
3. Shell Programming and Scripting
I am relatively new to shell scripting. I have a script I wrote that works fine in korn shell.
I need to make it work in bash on a different server.
There are a couple valid korn shell commands I am having difficulty finding the bash equivalents for.
At one point the scripts prompts the... (5 Replies)
Discussion started by: inakajin
5 Replies
4. Shell Programming and Scripting
I'm in the process of writng a function that consists of a case statement is there a way of calling the function and passing a value to it?
ie
function1 () {
case
opt1 do .....
opt2 do.....
esac
}
function opt1
I'm aware the syntax is not correct, but you get the general idea. (1 Reply)
Discussion started by: squrcles
1 Replies
5. UNIX for Dummies Questions & Answers
I'm having trouble trying to create a BASH shell script.
I want the user to input a command "cat file_name.c" and then the shell script will delete all comments "/* */" from file_name.c else exit.
So far I have this:
#!/bin/bash
read "cat file" // User will input command cat... (7 Replies)
Discussion started by: inkjoy00
7 Replies
6. Shell Programming and Scripting
Hi scripting experts.
I have some coding challenges that I'm hoping you can help me out.
I have one file#1 that contains the following sql statement that spans over multiple lines:
sql Select /*+ use_has(a,b) */ *
from customer a,
customer_address b
where a.id = b.id... (1 Reply)
Discussion started by: pchang
1 Replies
7. Shell Programming and Scripting
Hi All,
Kindly help on the below issue ASAP. Its very urgent.
I have script in which we have below two lines for code and it is not working. Please help.
files_to_process="
abc_*.log
def_*.log
ghi_*.log
"
typeset -A dir_list ${files_to_process}
the script is failing in Linux... (3 Replies)
Discussion started by: tvbhkishore
3 Replies
8. Shell Programming and Scripting
Migrating Unix batch jobs (Korn Shell) running in HP-UX server to Linux environment.
Hi All
Please help me to understand the easiest way to migrate Kernel Shell scripts to Linux Bash. Also let me know
1. Any automated scripts or tools available for this.
2. Challenges and issues... (5 Replies)
Discussion started by: cpremesh
5 Replies
9. Shell Programming and Scripting
I'm having an issue with bash read input when using a case statement.
The script halts and doesn't read the input on the first loop. if I hit enter then the scripts starts to respond as expected. Need some help here.
defaultans=8hrs
read -e -i $defaultans -p "${bldwht}How long would you like... (5 Replies)
Discussion started by: woodson2
5 Replies
10. Shell Programming and Scripting
Hi all,
I tried to execute a while within another while, but not working. Any suggestions? Thanks in advance
#!/bin/ksh
typeset -i i=1
typeset -i j=1
while ]
do
while ]
do
print i = $i j= $j
(( j=j+1 ))
done
(( i=i+1))
done (3 Replies)
Discussion started by: Soham
3 Replies
LEARN ABOUT DEBIAN
apr::threadmutex
libapache2-mod-perl2-2.0.7::docs::api::APR::ThreadMutex(User Contributed Perl Documentlibapache2-mod-perl2-2.0.7::docs::api::APR::ThreadMutex(3pm)
NAME
APR::ThreadMutex - Perl API for APR thread mutexes
Synopsis
use APR::ThreadMutex ();
my $mutex = APR::ThreadMutex->new($r->pool);
$mutex->lock;
$mutex->unlock;
$mutex->trylock;
Description
"APR::ThreadMutex" interfaces APR thread mutexes.
API
"APR::ThreadMutex" provides the following functions and/or methods:
Unsupported API
"APR::ThreadMutex" also provides auto-generated Perl interface for a few other methods which aren't tested at the moment and therefore
their API is a subject to change. These methods will be finalized later as a need arises. If you want to rely on any of the following
methods please contact the the mod_perl development mailing list so we can help each other take the steps necessary to shift the method to
an officially supported API.
"DESTROY"
META: Autogenerated - needs to be reviewed/completed
Destroy the mutex and free the memory associated with the lock.
$mutex->DESTROY();
obj: $mutex ( "APR::ThreadMutex object" )
the mutex to destroy.
ret: no return value
since: subject to change
"lock"
META: Autogenerated - needs to be reviewed/completed
Acquire the lock for the given mutex. If the mutex is already locked, the current thread will be put to sleep until the lock becomes
available.
$ret = $mutex->lock();
obj: $mutex ( "APR::ThreadMutex object" )
the mutex on which to acquire the lock.
ret: $ret ( integer )
since: subject to change
"new"
Create a new mutex
my $mutex = APR::ThreadMutex->new($p);
obj: "APR::ThreadMutex" ( class name )
arg1: $p ( "APR::Pool object" )
ret: $mutex ( "APR::ThreadMutex object" )
since: subject to change
"pool_get"
META: Autogenerated - needs to be reviewed/completed
META: should probably be renamed to pool(), like all other pool accessors
Get the pool used by this thread_mutex.
$ret = $obj->pool_get();
obj: $obj ( "APR::ThreadMutex object" )
ret: $ret ( "APR::Pool object" )
apr_pool_t the pool
since: subject to change
"trylock"
META: Autogenerated - needs to be reviewed/completed
Attempt to acquire the lock for the given mutex. If the mutex has already been acquired, the call returns immediately with APR_EBUSY. Note:
it is important that the APR_STATUS_IS_EBUSY(s) macro be used to determine if the return value was APR_EBUSY, for portability reasons.
$ret = $mutex->trylock();
obj: $mutex ( "APR::ThreadMutex object" )
the mutex on which to attempt the lock acquiring.
ret: $ret (integer)
since: subject to change
"unlock"
META: Autogenerated - needs to be reviewed/completed
Release the lock for the given mutex.
$ret = $mutex->unlock();
obj: $mutex ( "APR::ThreadMutex object" )
the mutex from which to release the lock.
ret: $ret ( integer )
since: subject to change
See Also
mod_perl 2.0 documentation.
Copyright
mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0.
Authors
The mod_perl development team and numerous contributors.
perl v5.14.2 2011-02-08 libapache2-mod-perl2-2.0.7::docs::api::APR::ThreadMutex(3pm)