04-15-2012
Thank you for the help. I tested and it worked very well. This is definately going on my offices wiki for one to remember.
---------- Post updated at 09:24 AM ---------- Previous update was at 09:21 AM ----------
I may have botched the reply, however, I wanted you both to know that your assistance was very timely and much needed. Both solutions worked as advertised. Again, much thanks. Now I can start hunting why some of my Oracle processes are crashing. I needed that line so that I could give a face to the PID I was using LSoF with.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
This is what I tried:
vara=${varb}_count
(( vara += 1 ))
Thanks for help (4 Replies)
Discussion started by: pa3be
4 Replies
2. UNIX for Dummies Questions & Answers
I'm having an issue when I export within my program. I'm getting the variable name, not the variable value. I have a configuration file (config.txt) that has the values of the variables set as so:
set -a
export ARCHIVEPOSourceDir="/interfaces/po/log /interfaces/po/data"
export... (2 Replies)
Discussion started by: ParNone
2 Replies
3. Shell Programming and Scripting
I have been working on a script that executes on a number of different operating systems. As a result I was trying to set a variable or perhaps variable array depending on the OS. I tried the following using eval and such but so far have not had any luck. Is there a way to do something like the... (4 Replies)
Discussion started by: scotbuff
4 Replies
4. Shell Programming and Scripting
Greetings folks
I'm using ksh on aix and have gone around and around trying to use a variable as a variable name. I would like to set a variable like this...
ym200702="01 02 05 06 07 08 09 12 13 14 15 16 19 20 21 22 23 26 27 28"
and then check to see if the variable has value...
if ];... (4 Replies)
Discussion started by: Smoker
4 Replies
5. Shell Programming and Scripting
I want to instert Category:XXXXX into the 2. line
something like this should work, but I have somewhere the wrong sytanx. something with the linebreak goes wrong:
sed "2i\\${n}Category:$cat\n"
Sample:
Titel Blahh Blahh abllk sdhsd sjdhf
Blahh Blah Blahh
Blahh
Should look like... (2 Replies)
Discussion started by: lowmaster
2 Replies
6. Shell Programming and Scripting
For example I have variable like below
echo $OUTPUT
/some/path/`uname -n`
when I try to use the variable OUTPUT like below
cd $OUTPUT or cd ${OUTPUT}
I am getting bad substituion error message
$ cd $OUTPUT
ksh: cd: bad substitution
$ cd ${OUTPUT}
ksh: cd: bad substitution
... (1 Reply)
Discussion started by: rajukv
1 Replies
7. UNIX for Dummies Questions & Answers
Hi all,
The below command tries to copy ".tgz" instead of "hello_test.tgz" -- It seems as if the underscore gets in the way. I tried with different ways of using quotes, with no luck, unfortunately...it's probably very simple, but may I ask how this would be done:
How would the below be... (3 Replies)
Discussion started by: chatguy
3 Replies
8. Shell Programming and Scripting
Hi,
I am trying to do the following thing
var='date'
$var
Above command substitutes date for and in turn runs the date command and i am getting the todays date value.
I am trying to do the same thing as following, but facing some problems,
unique_host_pro="sed -e ' /#/d'... (3 Replies)
Discussion started by: gvinayagam
3 Replies
9. Shell Programming and Scripting
hi,
I have been trying to acheive the following task for a while now, but failed.. Need help, experts please help!
This is what I am trying to do:
- I am writing to a flat file the name of the source to be copied and the destination path as to where it is to be copied to.
Sample flat file:... (7 Replies)
Discussion started by: abdulhusein
7 Replies
10. UNIX for Beginners Questions & Answers
Hello All,
Hope you're doing well !
I am trying below command to be passed in a shell script, header_date_14 is a variable and $1 is the name of a file I intend to pass as a command line argument, however command line argument is not being accepted.
header_date_14=$(m_dump... (8 Replies)
Discussion started by: ektubbe
8 Replies
LEARN ABOUT DEBIAN
dpid.h
dpid.h(3) libdaemon dpid.h(3)
NAME
dpid.h -
Contains an API for manipulating PID files.
SYNOPSIS
#include <sys/types.h>
Defines
#define DAEMON_PID_FILE_KILL_WAIT_AVAILABLE 1
This variable is defined to 1 iff daemon_pid_file_kill_wait() is supported.
Typedefs
typedef const char *(* daemon_pid_file_proc_t )(void)
Prototype of a function for generating the name of a PID file.
Functions
const char * daemon_pid_file_proc_default (void)
A function for creating a pid file name from daemon_pid_file_ident.
int daemon_pid_file_create (void)
Creates PID pid file for the current process.
int daemon_pid_file_remove (void)
Removes the PID file of the current process.
pid_t daemon_pid_file_is_running (void)
Returns the PID file of a running daemon, if available.
int daemon_pid_file_kill (int s)
Kills a running daemon, if available.
int daemon_pid_file_kill_wait (int s, int m)
Similar to daemon_pid_file_kill() but waits until the process died.
Variables
const char * daemon_pid_file_ident
Identification string for the PID file name, only used when daemon_pid_file_proc is set to daemon_pid_file_proc_default().
daemon_pid_file_proc_t daemon_pid_file_proc
A function pointer which is used to generate the name of the PID file to manipulate.
Detailed Description
Contains an API for manipulating PID files.
Definition in file dpid.h.
Define Documentation
#define DAEMON_PID_FILE_KILL_WAIT_AVAILABLE 1
This variable is defined to 1 iff daemon_pid_file_kill_wait() is supported. Since:
0.3
See also:
daemon_pid_file_kill_wait()
Definition at line 82 of file dpid.h.
Typedef Documentation
typedef const char*(* daemon_pid_file_proc_t)(void)
Prototype of a function for generating the name of a PID file.
Definition at line 37 of file dpid.h.
Function Documentation
int daemon_pid_file_create (void)
Creates PID pid file for the current process. Returns:
zero on success, nonzero on failure
Examples:
testd.c.
pid_t daemon_pid_file_is_running (void)
Returns the PID file of a running daemon, if available. Returns:
The PID or negative on failure
Examples:
testd.c.
int daemon_pid_file_kill (int s)
Kills a running daemon, if available. Parameters:
s The signal to send
Returns:
zero on success, nonzero on failure
int daemon_pid_file_kill_wait (int s, int m)
Similar to daemon_pid_file_kill() but waits until the process died. This functions is new in libdaemon 0.3. The macro
DAEMON_PID_FILE_KILL_WAIT_AVAILABLE is defined iff libdaemon supports this function.
Parameters:
s The signal to send
m Seconds to wait at maximum
Returns:
zero on success, nonzero on failure (timeout condition is considered a failure)
Since:
0.3
See also:
DAEMON_PID_FILE_KILL_WAIT_AVAILABLE
Examples:
testd.c.
const char* daemon_pid_file_proc_default (void)
A function for creating a pid file name from daemon_pid_file_ident. Returns:
The PID file path
int daemon_pid_file_remove (void)
Removes the PID file of the current process. Returns:
zero on success, nonzero on failure
Examples:
testd.c.
Variable Documentation
const char* daemon_pid_file_ident
Identification string for the PID file name, only used when daemon_pid_file_proc is set to daemon_pid_file_proc_default(). Use
daemon_ident_from_argv0() to generate an identification string from argv[0]
Examples:
testd.c.
daemon_pid_file_proc_t daemon_pid_file_proc
A function pointer which is used to generate the name of the PID file to manipulate. Points to daemon_pid_file_proc_default() by default.
Author
Generated automatically by Doxygen for libdaemon from the source code.
Version 0.14 17 Jan 2010 dpid.h(3)