01-10-2008
Within a script, an exit nnn command may be used to deliver an nnn exit status to the shell (nnn must be a decimal number in the 0 - 255 range), so setting up "WARNING = 255" and then :
if [condition] then exit ${WARNING} should be ok for you.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have my Mac OS X program executing a shell script (a script that copies files to a drive). I want to make it so that the shell script automatically kills itself if it finds that the host .app is not running OR kill itself if the drive that it is copying files to has been unmounted. Right now what... (2 Replies)
Discussion started by: pcwiz
2 Replies
2. Programming
I know it looks like a stupid question, but i really wanna know the reason.
Actually, i think it's because the c compiler will detect it as the end of file "EOF" of the program, but, am i wrong? because it compiles it anyway, but keep showing warnings like "no new line at the end of file".
I... (8 Replies)
Discussion started by: semash!
8 Replies
3. Programming
Hello everybody,
I'm having troubles on setting the default gateway address (and other addresses, such as netmask, or ip) of the host running a C program. I know it has to be with ioctl, but don't know how to do it.
Could somebody give me an example on how to set the default gateway address of... (4 Replies)
Discussion started by: semash!
4 Replies
4. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I have a question about the difference between a host and an end system. I have read a textbook and I am still... (2 Replies)
Discussion started by: greenesses
2 Replies
5. Shell Programming and Scripting
Hi,
I'm trying to copy a file from one server to remote server using SCP command. Below is the command i tried and got host key not found in database errror.
scp sendfile.txt Remoteserver:/home/xxxx/.
Error Message:
Host key not found from database
Key fingerprint:... (2 Replies)
Discussion started by: skcvasanth
2 Replies
6. Solaris
Hi all,
I have written the following program and run on both T5440 and T5220 on same OS version. I found that T5540 server takes more time than T5220. Please find below the details.
test1.cpp
#include <iostream>
#include <pthread.h>
using namespace std;
#define NUM_OF_THREADS 20... (17 Replies)
Discussion started by: sanjay_singh85
17 Replies
7. Shell Programming and Scripting
i have the follow shell script that try to find any file in the specified path and upload to oracle.
if no file will output in the concurrent log and the program return as error , how do i change the program so that if no file found will give out normal sucessful result.
i tried change the exit... (3 Replies)
Discussion started by: feilhk
3 Replies
8. AIX
Hi,
What are the differences between concurrent and enhanced concurrent VGs.?
Any advantages of enhanced concurrent VG over normal concurrent vg
Regards,
Siva (2 Replies)
Discussion started by: ksgnathan
2 Replies
9. Shell Programming and Scripting
Hi All,
I have a requirement to make a oracle concurrent program end with
warning based on a given condition. If the condition is true, the
concurrent program should end with completed warning status.
The host program I am using is a shell script that checks if a file exists.
... (2 Replies)
Discussion started by: megha2525
2 Replies
LEARN ABOUT FREEBSD
trimdomain
TRIMDOMAIN(3) BSD Library Functions Manual TRIMDOMAIN(3)
NAME
trimdomain -- trim the current domain name from a host name
LIBRARY
System Utilities Library (libutil, -lutil)
SYNOPSIS
#include <sys/types.h>
#include <libutil.h>
void
trimdomain(char *fullhost, int hostsize);
DESCRIPTION
The function trimdomain() removes the current domain name from the passed fullhost name by writing a NUL character over the first period of
the passed name. The current domain name is determined by calling gethostname(3) and removing everything up to the first period. The name
is determined the first time this function is called and is cached for future use.
The trimdomain() function will only trim the domain name if the passed fullname ends with the current domain name and if the length of the
resulting host name does not exceed hostsize.
If the passed fullname is actually a DISPLAY specification of the form host.domain:nn[.nn] and the domain name is the same as the local
domain name, trimdomain() will remove the embedded domain name, copying the screen and display numbers to the end of the base host name and
resulting in host:nn[.nn].
RETURN VALUES
The trimdomain() function does not return a value.
SEE ALSO
gethostname(3)
BSD
April 7, 1999 BSD