9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am using korn shell.
until ]
do
echo "\$# = " $#
echo "$1"
shift
done
To the above script, I passed 2 parameters and the program control doesn't enter inside "until" loop. If I change it to until ] then it does work.
Why numeric comparison is not working with -ne and works... (3 Replies)
Discussion started by: ab_2010
3 Replies
2. UNIX for Dummies Questions & Answers
find . -name "05_scripts" -type d -exec mv -f {}/'*.aep\ Logs' {}/.LogFiles \;
Returns this failure:
mv: rename ./019_0120_WS_WH_gate_insideTEST/05_scripts/*.aep\ Logs to ./019_0120_WS_WH_gate_insideTEST/05_scripts/.LogFiles/*.aep\ Logs: No such file or directory
I don't know why it's trying... (4 Replies)
Discussion started by: scribling
4 Replies
3. Shell Programming and Scripting
If there exists a field in stdin, print it, otherwise, print hello.....
These print nothing:
cat /dev/null | awk '{if ( length > 0 ) print $1; else print "hello"}'
cat /dev/null | awk '{if ( $1 ) print $1; else print "hello"}'But the scripts work if I run them directly in a terminal:
... (8 Replies)
Discussion started by: ksheller
8 Replies
4. Shell Programming and Scripting
Hi. I've been playing around a bit. This isn't for any practical purpose-- it's really just a theoretical exercise. I wrote this little thing:
foreach num ( 6 5 4 )
awk -v "number=$num" 'BEGIN{for(x=0;x<$number;x++) printf "-"; printf "\n"}'
end
I would expect the following output:
... (3 Replies)
Discussion started by: treesloth
3 Replies
5. UNIX for Dummies Questions & Answers
why lp -o <option> doesn't work on my SCO Unix. (4 Replies)
Discussion started by: wendyz
4 Replies
6. UNIX for Dummies Questions & Answers
Hi!
I have 2 servers. The firts has vsftpd server with this configuration:
# Example config file /etc/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all... (2 Replies)
Discussion started by: Torquemada
2 Replies
7. UNIX for Dummies Questions & Answers
Howdie everyone...
I have a shell script RemoveFiles.sh
Inside this file, it only has two commands as below:
rm -f ../../reportToday/temp/*
rm -f ../../report/*
My problem is that when i execute this script, nothing happened. Files remained unremoved. I don't see any error message as it... (2 Replies)
Discussion started by: cheongww
2 Replies
8. UNIX for Dummies Questions & Answers
it seams that my ctrl+c and my ctrl+d don't work. if I type a bunch of jiberish on a line and ctrl+c I expect the command to be cancelled and to be given a fresh prompt, but instead it just putts ^C at the end of the line.
Also, ctrl+d should close the session, but instead mine just puts ^D at... (3 Replies)
Discussion started by: yankee428
3 Replies
9. Shell Programming and Scripting
cat .servers | while read LINE; do
ssh jason@$LINE $1
done
exit 1
./command.ksh "ls -l ~jason"
Why does this ONLY iterate on the first server in the list? It's not doing the command on all the servers in the list, what am I missing?
Thanks!
JP (2 Replies)
Discussion started by: jpeery
2 Replies
dlclose(3) Library Functions Manual dlclose(3)
NAME
dlclose - Close a dlopen() object
SYNOPSIS
#include <dlfcn.h>
int dlclose(void *handle)
PARAMETERS
A pointer to a global symbol object that is returned from a call to dlopen().
DESCRIPTION
The dlclose function is used to inform the system that the object referenced by a handle returned from a previous dlopen() invocation is no
longer needed by the application.
The use of dlclose() reflects a statement of intent on the part of the process, but does not create any requirements on the dynamic library
loader, such as removal of the code or symbols referenced by handle. Once an object has been closed using dlclose(), an application should
assume that its symbols are no longer available to dlsym(). All objects loaded automatically as a result of invoking dlopen() on the refer-
enced object are also closed.
The dlclose function deallocates the address space for the library corresponding to handle. The results are undefined if any user function
continues to call a symbol resolved in the address space of a library that has since been deallocated by dlclose.
The dlclose operation will not remove an object to which references have been relocated, until or unless all such references are removed.
For instance, an object that had been loaded with a dlopen() operation specifying the RTLD_GLOBAL flag might provide a target for dynamic
relocations performed in the processing of other objects - in such environments, an application may assume that no relocation, once made,
will be undone or remade unless the object requiring the relocation has itself been removed.
RETURN VALUE
If the referenced object was successfully closed, dlclose() returns 0. If the object could not be closed or if handle does not refer to an
open object, dlclose() returns a non-zero value. More detailed diagnostic information will be available through dlerror().
ERRORS
No errors are defined.
NOTES
The dlopen and dlclose routines might dynamically change the resolution of certain symbols referenced by a program or its shared library
dependencies. The dlopen routine might resolve symbols that were previously unresolved, and dlclose might cause resolved symbols to become
unresolved or to be reresolved to a different symbol definition.
A portable application will employ a handle returned from a dlopen() invocation only within a given scope bracketed by the dlopen() and
dlclose() operations. The dynamic library loader is free to use reference counting or other techniques such that multiple calls to
dlopen() referencing the same object may return the same object for handle. The dynamic library loader is also free to re-use a handle. For
these reasons, the value of a handle must be treated as an opaque object by the application, used only in calls to dlsym() and dlclose().
RELATED INFORMATION
dlerror(3), dlopen(3), dlsym(3). delim off
dlclose(3)