I parse those datalines and comparing values.
I also create variable which name is column ATTRIBUTE_NAME. Possible to use variable and comparing those. Only example if needed.
This is the code:
while test 1 -eq 1
do
read a
$a
if test $a = stop
then
break
fi
done
I read a command on every loop an execute it.
I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test.
For example echo hello.
Now the... (1 Reply)
Hi,
I have a Python unit test cases source code file which contains more than a hundred test case methods. In that, some of the test case methods already have prefix 'test' where as some of them do not have. Now, I need to add the string 'test' (case-sensitive) as a prefix to those of the... (5 Replies)
I have a following script to evaluate if file exist in the directory and then archive it.
#!/bin/bash
#master directory
scriptdir="/flex/sh/interfaces" #change this path only - all other paths are connected with it
filedir="/flex/interfaces" #change this path only - all other paths are... (3 Replies)
Testing some old script developed by different user.
#!/usr/bin/sh
case "$0" in
*/*) cmd="$0";;
*) cmd=`which "$0"`;;
esac
dir=`dirname "$cmd"`
node="$dir/."
echo $node
below two simple tests are failing, I am not seeing any Control+M characters in the script file and I am not able... (4 Replies)
I am installing Oracle DBD to PERL 5.16.3 and during make test , I am running into this error :rm -f blib/arch/auto/DBD/Oracle/Oracle.so
LD_RUN_PATH="/opt/oracle/product/11.2.0/racdb11204/lib" gcc -m32 -shared -O2 -L/usr/local/lib -fstack-protector Oracle.o dbdimp.o oci8.o -o... (3 Replies)
Discussion started by: talashil
3 Replies
LEARN ABOUT OPENDARWIN
elf_errmsg
elf_errmsg(3ELF) ELF Library Functions elf_errmsg(3ELF)NAME
elf_errmsg, elf_errno - error handling
SYNOPSIS
cc [ flag ... ] file ... -lelf [ library ... ]
#include <libelf.h>
const char *elf_errmsg(int err);
int elf_errno(void);
DESCRIPTION
If an ELF library function fails, a program can call elf_errno() to retrieve the library's internal error number. As a side effect, this
function resets the internal error number to 0, which indicates no error.
The elf_errmsg() function takes an error number, err, and returns a null-terminated error message (with no trailing new-line) that
describes the problem. A zero err retrieves a message for the most recent error. If no error has occurred, the return value is a null
pointer (not a pointer to the null string). Using err of -1 also retrieves the most recent error, except it guarantees a non-null return
value, even when no error has occurred. If no message is available for the given number, elf_errmsg() returns a pointer to an appropriate
message. This function does not have the side effect of clearing the internal error number.
EXAMPLES
Example 1: A sample program of calling the elf_errmsg() function.
The following fragment clears the internal error number and checks it later for errors. Unless an error occurs after the first call to
elf_errno(), the next call will return 0.
(void)elf_errno();
/* processing ... */
while (more_to_do)
{
if ((err = elf_errno()) != 0)
{
/* print msg */
msg = elf_errmsg(err);
}
}
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Stable |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO elf(3ELF), libelf(3LIB), attributes(5)SunOS 5.10 11 Jul 2001 elf_errmsg(3ELF)