I wasn't sure if I should post it here of in the Shell Script category, but I figured it was definitely a newbie question.
I'm trying to write a script that will check for the existence of a specific file (or for any files within the directory) and then take specific actions. I've removed all... (2 Replies)
Hey all,
I have total new with shell scripting so I don't know if what I need to do even possible, here it is...for a duration of time (say...1 hour) I need to check for the existence of a particular file, if it exists then I will invoke a java program or I will continue to check until a)... (2 Replies)
Hello,
I have this process app.fcgi and a directory containing images. I'd like to ensure that only app.cgi can access those images and more generally that folder.Thanks! (1 Reply)
Hi
I want to check a particular file is available or not. But i know only the pattern of that file sat AB1234*.txt.I need the latest file name and it ll be used in the script. How can i do this using ls -ltr command.
Thanks,
LathishSundar V (2 Replies)
Hi,
I want to make a bash script which is running like :
1.sh http://www. google.com
and check if the url does exist printing a message.
I want to save the source code of this page in a file.
Could you help me ? (4 Replies)
Hi
I'm using the below command in shell script to check for file exists in the path
if
.....
fi
path and test are variables
path and the file exists but the commands inside if condition is executed (! operator used)
Is the above way of checking for file existence is correct?
... (4 Replies)
Hope someone can help me on this
In a directory ,files are dynamically generated.I need a script to do the following
if files are not received for more than 2 hours or if the received file is empty
then do something
How can I put that in a script.Thank you
eg. in cd /dir_name the... (13 Replies)
I'm on AIX. I have triggered an infinite loop process (to keep looking for input file availability for further process). At present only I can kill the process.
In case my colleague wants to kill the process for any reason, how do I provide permission to others to kill the process?
Currently... (3 Replies)
Discussion started by: krishmaths
3 Replies
LEARN ABOUT DEBIAN
explain_kill_or_die
explain_kill_or_die(3) Library Functions Manual explain_kill_or_die(3)NAME
explain_kill_or_die - send signal to a process and report errors
SYNOPSIS
#include <libexplain/kill.h>
void explain_kill_or_die(pid_t pid, int sig);
int explain_kill_on_error(pid_t pid, int sig);
DESCRIPTION
The explain_kill_or_die function is used to call the kill(2) system call. On failure an explanation will be printed to stderr, obtained
from the explain_kill(3) function, and then the process terminates by calling exit(EXIT_FAILURE).
The explain_kill_on_error function is used to call the kill(2) system call. On failure an explanation will be printed to stderr, obtained
from the explain_kill(3) function, but still returns to the caller.
pid The pid, exactly as to be passed to the kill(2) system call.
sig The sig, exactly as to be passed to the kill(2) system call.
RETURN VALUE
The explain_kill_or_die function only returns on success, see kill(2) for more information. On failure, prints an explanation and exits, it
does not return.
The explain_kill_on_error function always returns the value return by the wrapped kill(2) system call.
EXAMPLE
The explain_kill_or_die function is intended to be used in a fashion similar to the following example:
explain_kill_or_die(pid, sig);
SEE ALSO kill(2) send signal to a process
explain_kill(3)
explain kill(2) errors
exit(2) terminate the calling process
COPYRIGHT
libexplain version 0.52
Copyright (C) 2009 Peter Miller
explain_kill_or_die(3)