Maybe something like this using brackets to group commands together...
If command1 is successful, then run the 'dostuff' function, if not successful, print error message.
if you're calling a function though, you don't need the parentheses, as in "dostuff()", it would just be "dostuff". You can use the parentheses when you're defining a function though.
hello all
i have string that i need to parse something list that :
<form name="CustomerStatus" action="<% env.GetURI %>" method="post"<$if(blah)%> name="<% env.get("StatusList") %>" ><% hello %><input type="hidden" name="<% env.get("Operation") %>" value="">
now im selecting the the string... (6 Replies)
I want to count the number of lines in a file and store it in a variable if this count is zero i hv to throw an error ...is this syntax correct , but i am not getting the desired result
I am not using -s option here as i am concerned about record count not the size
#!/bin/ksh
set $count1... (4 Replies)
Hi I have script that is developed to serch for 30 days old Directory & Files and then remove them ...
when i run it successfully removes the Directory & files & but it throw errors on the screen
..
..
+ find . -type f -mtime +30 -exec rm -f {} ;
+ exit
please help me ??
I... (0 Replies)
Hi,
I have a requirement like i have to search a script and find names that conatins more than two dots, if so then throw error.
For ex: a1.b1.comname here i have to find comname and check two dots. it will not throw error
a1.b1.c1.comname here it contains more than 2dots it will throw... (3 Replies)
Hi,
This error is actually out of implementing the command posted here -
https://www.unix.com/shell-programming-scripting/155589-remove-blank-lines-merge-lines-shell.html
Here is the error i get -
awk: Input line xxxxx cannot be longer than 3,000 bytes.
The source line number is 1.... (1 Reply)
Hi Folks,
Today hasn't been the best one of my career in IT.
I've been a contractor for a major utility company for a number of years, on a number of seperate IT contracts mostly Unix. The company had 10 different flavours of unix and multiple different varsions of most of them.
At the... (3 Replies)
OS: HP-UX B.11.31 U ia64
shell : /sbin/sh
Messages like "debug3: Wrote 48 bytes for a total of 15837" are thrown in my terminal after each key stroke. If I try to type a command such message appears after each character I type. If I simply press enter messages like below appear.
... (1 Reply)
I need to multiply column1 and column3 data and need to compare it with column5. Need to check multiplication and Throw error if result is greater or less than column5 values, though difference of +/- 2 will be ok
Ex - if column1 has 2.4 and column3 has 3.5, it will be ok if column5 have value... (13 Replies)
Discussion started by: as7951
13 Replies
LEARN ABOUT HPUX
elf_error
elf_error(3E)elf_error(3E)NAME
elf_errmsg, elf_errno - error handling
SYNOPSIS
[flag... ] file... [library] ...
DESCRIPTION
If an ELF library function fails, a program may call to retrieve the library's internal error number. As a side effect, this function
resets the internal error number to zero, which indicates no error.
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, returns a pointer to an appropriate message. This function does not have the
side effect of clearing the internal error number.
EXAMPLES
The following fragment clears the internal error number and checks it later for errors. Unless an error occurs after the first call to the
next call will return zero.
(void)elf_errno();
while (more_to_do)
{
/* processing ... */
if ((err = elf_errno()) != 0)
{
msg = elf_errmsg(err);
/* print msg */
}
}
SEE ALSO elf(3E), elf_version(3E).
elf_error(3E)