hi,
I just started to work on unix,
I was wondering if it is possible to call a c++ function from a script.
now, i don't mean starting a program, i mean dynamicaly calling a funtion (like working with a dll)
thanks (3 Replies)
Hi folks,
I'm just running through an oreilly korn shell book but have witnessed an output difference on my own unix machine and the output provided in the book. Can anyone help?
create a script called ascript as follows:
function afunc {
print in function $0: $1 $2
var1="in... (16 Replies)
Hi,
Can we define a function say func1 in a script 1.sh and call this function from another script say 2.sh by passing an argument :confused: (2 Replies)
:confused:Hi ,
I have a script as shown below:
rpttxt()
{
name="$*"
awk '/'"${name}"'/ {print $2 $3"=" $4}' file.txt
}
xx = rpttxt "COL_HEAD_1"
awk 'BEGIN {printf("%36s \n ","'"$xx"'")}'
rpttxt() is a function..I want to store the final result of this function in... (3 Replies)
i have a function defined in one ksh (ksh 1)
i want to use that function in another ksh (ksh 2)
i am using
. $<directoryname>/<ksh name>
i am calling the function defined in ksh 1 in ksh 2
i want the returnstatus from the above operation
but it is not executing the function
what i... (1 Reply)
Hi,
I have searched the forum for the query, But i didnt find an exact answer.
I have a script(1.sh) and a c program(sample.c)
sample.c contains many function definitions.( run(), find(), add() etc).
I want to call functions in sample.c from 1.sh and use the return value in 1.sh... (3 Replies)
This is my function which is creating three variables based on counter & writing these variable to database by calling another function writeRecord
but only one record is getting wrote in DB.... Please advise ASAP...:confused:
function InsertFtg
{
FTGSTR=""
echo "Saurabh is GREAT $#"
let... (2 Replies)
In the below bash the function execute is started with the while true at the end of the script. Currently, this works and processing does begin. The function panel in bold does not get called after execute completes, therefore the user does not get the menu selection and the files just loop... (3 Replies)
Hi
I need to call a function in database and update the return value of that function with a value in csv file.
test.csv
1,2,3,,5,,,8,9,10
1,2,3,4,5,,,8,9,10
1,2,3,,,,,8,9,10In the above file I want to replace column 2 with a value extracted from database
like (select student_id from... (3 Replies)
Discussion started by: kev94
3 Replies
LEARN ABOUT DEBIAN
explain_readlink_or_die
explain_readlink_or_die(3) Library Functions Manual explain_readlink_or_die(3)NAME
explain_readlink_or_die - read value of a symbolic link and report errors
SYNOPSIS
#include <libexplain/readlink.h>
ssize_t explain_readlink_or_die(const char *pathname, char *data, size_t data_size);
ssize_t explain_readlink_on_error(const char *pathname, char *data, size_t data_size))
DESCRIPTION
The explain_readlink_or_die function is used to call the readlink(2) system call. On failure an explanation will be printed to stderr,
obtained from the explain_readlink(3) function, and then the process terminates by calling exit(EXIT_FAILURE).
The explain_readlink_on_error function is used to call the readlink(2) system call. On failure an explanation will be printed to stderr,
obtained from the explain_readlink(3) function, but still returns to the caller.
pathname
The pathname, exactly as to be passed to the readlink(2) system call.
data The data, exactly as to be passed to the readlink(2) system call.
data_size
The data_size, exactly as to be passed to the readlink(2) system call.
RETURN VALUE
The explain_readlink_or_die function only returns on success, see readlink(2) for more information. On failure, prints an explanation and
exits, it does not return.
The explain_readlink_on_error function always returns the value return by the wrapped readlink(2) system call.
EXAMPLE
The explain_readlink_or_die function is intended to be used in a fashion similar to the following example:
ssize_t result = explain_readlink_or_die(pathname, data, data_size);
SEE ALSO readlink(2)
read value of a symbolic link
explain_readlink(3)
explain readlink(2) errors
exit(2) terminate the calling process
COPYRIGHT
libexplain version 0.52
Copyright (C) 2009 Peter Miller
explain_readlink_or_die(3)