05-04-2006
Perhaps you can use:
print -n
bye
10 More Discussions You Might Find Interesting
1. Post Here to Contact Site Administrators and Moderators
I think that HTML code within posts should be turned off -- the vB Code can provide all the features we need. Then, you should modify the program to automatically escape any angle brackets, so that < gets translated to &lt; and > gets translated to &gt;
I see a lot of people garble their posts... (4 Replies)
Discussion started by: PxT
4 Replies
2. Shell Programming and Scripting
Keeping in mind that I'm relatively comfortable with programming in general but very new to unix and korn/bourne shell scripts..
I'm using awk on a CSV file, and then performing calculations and operations on specific fields within specific records. The CSV file I'm working with has about 600... (2 Replies)
Discussion started by: yongho
2 Replies
3. Shell Programming and Scripting
I'm new to the script programming and I have this piece of code (repeatedly used) in my program:
while :
do
................
ans=`ckyorn -p "Do you want to continue?"`
if || || || ; then
break
elif || ; then
echo "Aborting..."
exit... (2 Replies)
Discussion started by: bluemoon1
2 Replies
4. Shell Programming and Scripting
Hi, I'm writing a long script for bash (on RHEL 5.0) to execute many commands. So, my idea is to create a function to deal with error checking and logging (see ceckoutput() below). This works with all commands except for sed. I think it may be a problems with escaped characters. So I did the... (4 Replies)
Discussion started by: macL
4 Replies
5. Shell Programming and Scripting
I work in an environment where we have a Oracle DB Server on a AIX box. There are several batch scripts that load and execute on the database. The DBA wants to periodically change the password. Ideally I would like to have one common place to maintain the database as it is changed. I was thinking... (2 Replies)
Discussion started by: mode09
2 Replies
6. UNIX for Advanced & Expert Users
Hi folks.
I work with several production servers, and I have seen in some Kernel Cache using most of the memory.
See this pic:
http://i51.tinypic.com/301nb6c.jpg
Do you think this is a smart choice? Remember these are productions servers and it is extremely necesary this does not... (6 Replies)
Discussion started by: erick_tuk
6 Replies
7. Solaris
Hi, this is my first post and hope to make some contribution soon.
I'm still learning the basics of UNIX and Linux and BASH. Thus my need to understand the subject at hand. I don't have a problem with technical detail, so hit me :)
I have a script where two commands use the contents of a... (2 Replies)
Discussion started by: doublefrangelic
2 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have a file containing color codes:
Fri May 25 17:13:04 2012: Starting MTA: exim4^ Loading cpufreq kernel modules...^How can I display it colorized on a linux terminal? (4 Replies)
Discussion started by: ripat
4 Replies
9. Shell Programming and Scripting
Hi
Input:
-
--
---
----
aa-bb-cc
aa--bb--cc
aa---bb---cc
aa----bb----cc
Output:
.
-
-.
--
aa.bb.cc (7 Replies)
Discussion started by: chitech
7 Replies
10. UNIX for Dummies Questions & Answers
Not sure if this is possible, but I'm trying to read in a variable that needs to have its escape backslashes intact. So the person who enters the actual value does not have to type any \ characters. Example:
read list
X1000\ filecab.txt
echo "$list"
In this case the \ needs to be... (3 Replies)
Discussion started by: newbie2010
3 Replies
ATEXIT(3) Linux Programmer's Manual ATEXIT(3)
NAME
atexit - register a function to be called at normal process termination
SYNOPSIS
#include <stdlib.h>
int atexit(void (*function)(void));
DESCRIPTION
The atexit() function registers the given function to be called at normal process termination, either via exit(3) or via return from the
program's main(). Functions so registered are called in the reverse order of their registration; no arguments are passed.
The same function may be registered multiple times: it is called once for each registration.
POSIX.1 requires that an implementation allow at least ATEXIT_MAX (32) such functions to be registered. The actual limit supported by an
implementation can be obtained using sysconf(3).
When a child process is created via fork(2), it inherits copies of its parent's registrations. Upon a successful call to one of the
exec(3) functions, all registrations are removed.
RETURN VALUE
The atexit() function returns the value 0 if successful; otherwise it returns a nonzero value.
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
+----------+---------------+---------+
|Interface | Attribute | Value |
+----------+---------------+---------+
|atexit() | Thread safety | MT-Safe |
+----------+---------------+---------+
CONFORMING TO
POSIX.1-2001, POSIX.1-2008, C89, C99, SVr4, 4.3BSD.
NOTES
Functions registered using atexit() (and on_exit(3)) are not called if a process terminates abnormally because of the delivery of a signal.
If one of the functions registered functions calls _exit(2), then any remaining functions are not invoked, and the other process termina-
tion steps performed by exit(3) are not performed.
POSIX.1 says that the result of calling exit(3) more than once (i.e., calling exit(3) within a function registered using atexit()) is unde-
fined. On some systems (but not Linux), this can result in an infinite recursion; portable programs should not invoke exit(3) inside a
function registered using atexit().
The atexit() and on_exit(3) functions register functions on the same list: at normal process termination, the registered functions are
invoked in reverse order of their registration by these two functions.
According to POSIX.1, the result is undefined if longjmp(3) is used to terminate execution of one of the functions registered using
atexit().
Linux notes
Since glibc 2.2.3, atexit() (and on_exit(3)) can be used within a shared library to establish functions that are called when the shared
library is unloaded.
EXAMPLE
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
void
bye(void)
{
printf("That was all, folks
");
}
int
main(void)
{
long a;
int i;
a = sysconf(_SC_ATEXIT_MAX);
printf("ATEXIT_MAX = %ld
", a);
i = atexit(bye);
if (i != 0) {
fprintf(stderr, "cannot set exit function
");
exit(EXIT_FAILURE);
}
exit(EXIT_SUCCESS);
}
SEE ALSO
_exit(2), dlopen(3), exit(3), on_exit(3)
COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the
latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
Linux 2017-09-15 ATEXIT(3)