06-09-2010
Yes this solution I allready figured out. I was wondering is there a way to do it without file with function definition ?
Maybe through some interface like in object oriented programming ?
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i have a function written in one shell script and i want to call that function in another shell script and use the value returned by that script.
can any one suggest me how can i do that?
regards,
Rajesh.P (4 Replies)
Discussion started by: rajesh.P
4 Replies
2. Shell Programming and Scripting
Hi all,
I want to monitoring my interface every 6 hours where i want to run snoop command to capture all packet through the interface, so i want running snoop then snoop will run for 5 minutes after that snoop stop then will start again after 6 hours than run for 5 minutes again.
thereis any... (9 Replies)
Discussion started by: tindasz
9 Replies
3. Shell Programming and Scripting
Here is the following code :
1.
# gcc -c test firstprog.c
the above command will generate a executable file called "test " in which ever directory it is run.
Assuming It will also return a value.
2. In the below SCRIPT . test is a file generated by compiling a c program... (3 Replies)
Discussion started by: Vabiosis
3 Replies
4. Shell Programming and Scripting
The following code doesn't work properly which means it doesn't displays remote output.
#!/bin/ksh
#################### Function macAddressFinder ########################
macAddressFinder()
{
`ifconfig -a > ipInterfaces`
`cat ipInterfaces`
}... (2 Replies)
Discussion started by: presul
2 Replies
5. Shell Programming and Scripting
Hello,
I have Individual function in my shell script ,
Function1
{
Master activities
}
Function2
{
Sub activities 1
}
Function3
{
Sub activities 2
}
… (2 Replies)
Discussion started by: Shanks
2 Replies
6. Shell Programming and Scripting
Hey, i got this 2 file. When i try to pick option 1, which is test1, it says ./test: test1: not found.
Any idea on how i can fix it?
#!/bin/sh
QUIT=0
`dirname $0`/testfile
while ;
do
testmenu
read option
case $option in
1) test1 ;;
2) test2 ;;
3) echo... (2 Replies)
Discussion started by: Nick1097
2 Replies
7. Shell Programming and Scripting
I have this script in server2
# cat /root/yesno.sh
#!/bin/bash
read -p "are you sure?" -n 1 -r
if $ ]]; then
echo ""
echo "YES"
else
echo "NO"
fi
# sh /root/yesno.sh
are you sure?y
YES (5 Replies)
Discussion started by: anil510
5 Replies
8. Shell Programming and Scripting
Hello
For HP-UX, ksh shell, is it possible to define functions and call them by another user ? For example
<function_name> ( ) {
command1
command2
}
su - <user> -c <function_name>
Or the only option is defining the user in the function itself as follows -
<function_name> ( )... (2 Replies)
Discussion started by: atanubanerji
2 Replies
9. Shell Programming and Scripting
Linux System having all Perl, Python, PHP (and Ruby) installed
From a Shell script, can call a Perl, Python, PHP (or Ruby ?) file
eg
eg
a Shell script run in a case statement call to run a php file, also Perl or/and Python file???
Like
#!/usr/bin/bash
....
....
case $INPUT_STRING... (1 Reply)
Discussion started by: hoyanet
1 Replies
PX_NEW(3) PX_NEW(3)
px_new - Create a new paradox object
SYNOPSIS
resource px_new (void )
DESCRIPTION
Create a new paradox object. You will have to call this function before any further functions. px_new(3) does not create any file on the
disk, it just creates an instance of a paradox object. This function must not be called if the object oriented interface is used. Use new
paradox_db() instead.
RETURN VALUES
Returns FALSE on failure.
EXAMPLES
Example #1
Opening a Paradox database
<?php
if(!$pxdoc = px_new()) {
/* Error handling */
}
$fp = fopen("test.db", "r");
if(!px_open_fp($pxdoc, $fp)) {
/* Error handling */
}
// ...
px_close($pxdoc);
px_delete($pxdoc);
fclose($fp);
?>
If you prefer the object oriented API, then the above example will look like the following.
Example #2
Opening a Paradox database
<?php
$fp = fopen("test.db", "r");
$pxdoc = new paradox_db();
if(!$pxdoc->open_fp($fp)) {
/* Error handling */
}
// ...
$pxdoc->close();
fclose($fp);
?>
SEE ALSO
px_delete(3), px_open_fp(3).
PHP Documentation Group PX_NEW(3)