09-07-2010
Not including the right headers can cause runtime errors, since the function may be implicitly defined as having the wrong arguments and return types.
10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
Hello
I' m confused a bit.
I want to replace string "&" with "&" using this command.
sed 's/&/&/g'
and it doesn't work. Nothing happens.
On the other side this works:
sed 's/&/@/g'
or sed 's/&/^/g' !!!
Can somebody help please?
Thanks (3 Replies)
Discussion started by: billy5
3 Replies
3. 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
4. HP-UX
As per the man page, pstat_getdisk() call returns the number of instances, which could be 0 upon successful completion, otherwise a value of -1 is returned.
Please have a look at this sample program ->
#include <stdio.h>
#include <sys/pstat.h>
int main()
{
int j = 0, ret;
struct... (2 Replies)
Discussion started by: sandiworld
2 Replies
5. UNIX for Dummies Questions & Answers
hi
I wrote the following makefile, I have just one problem, when i type make clean I get the message make 'clean' is up to date and any obj file is removed from my folder, what's wrong?
Thank you
CC = cc
all: es.o elaboration.o
$(CC) -o es es.o elaboration.o
elaboration.o:... (0 Replies)
Discussion started by: Puntino
0 Replies
6. 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
7. 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
8. Shell Programming and Scripting
greetings,
the following code isn't working as i expect it to. the first dbl brackets do but the second set gets ignored. ie: if i'm on t70c6n229 it echoes "Something" and i expect it not to. what am i missing?
if " ]] || " ]]; then
echo "Something"
fi
thanx! (9 Replies)
Discussion started by: crimso
9 Replies
9. HP-UX
I edited sudoers like this:vi /etc/sudoers
subex ALL =(root) NOPASSWD: /usr/ccs/bin/pstack
But the respective user still is prompted for password, and even when the right password is used, the command is still not launched.$sudo usr/ccs/bin/pstack 26557
We trust you have received the usual... (5 Replies)
Discussion started by: black_fender
5 Replies
10. 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
LEARN ABOUT MINIX
thr_exit
thr_exit(3C) Standard C Library Functions thr_exit(3C)
NAME
thr_exit - terminate the calling thread
SYNOPSIS
cc -mt [ flag... ] file...[ library... ]
#include <thread.h>
void thr_exit(void *status);
DESCRIPTION
The thr_exit() function terminates the calling thread, in a similar way that exit(3C) terminates the calling process. If the calling thread
is not detached, then the thread's ID and the exit status specified by status are retained. The value status is then made available to any
successful join with the terminating thread (see thr_join(3C)); otherwise, status is disregarded allowing the thread's ID to be reclaimed
immediately.
Any cancellation cleanup handlers that have been pushed and not yet popped are popped in the reverse order that they were pushed and then
executed. After all cancellation cleanup handlers have been executed, if the thread has any thread-specific data, appropriate destructor
functions will be called in an unspecified order. Thread termination does not release any application visible process resources,including,
but not limited to, mutexes and file descriptors, nor does it perform any process level cleanup actions, including, but not limited to,
calling any atexit() routines that might exist.
If any thread, including the main() thread, calls thr_exit(), only that thread will exit.
If main() returns or exits (either implicitly or explicitly), or any thread explicitly calls exit(), the entire process will exit.
The behavior of thr_exit() is undefined if called from a cancellation cleanup handler or destructor function that was invoked as a result
of either an implicit or explicit call to thr_exit().
After a thread has terminated, the result of access to local (auto) variables of the thread is undefined. Thus, references to local vari-
ables of the exiting thread should not be used for the thr_exit() status parameter value.
If any thread (except the main() thread) implicitly or explicitly returns, the result is the same as if the thread called thr_exit() and it
will return the value of status as the exit code.
The process will terminate with an exit status of 0 after the last non-daemon thread has terminated (including the main() thread). This
behavior is the same as if the application had called exit() with a 0 argument at thread termination time.
RETURN VALUES
The thr_exit() function cannot return to its caller.
ERRORS
No errors are defined.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO
exit(3C), thr_create(3C), thr_join(3C), thr_keycreate(3C), attributes(5), standards(5)
NOTES
Although only POSIX implements cancellation, cancellation can be used with Solaris threads, due to their interoperability.
The status argument should not reference any variables local to the calling thread.
SunOS 5.10 27 Mar 2000 thr_exit(3C)