01-30-2009
Are there any other Variables you want to use inside the users initialization files? Else you could just do
su oracle -c program
instead of
su - oracle -c program
The difference is in the 1st case you run the program with no initialization.
Peace,
G
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
A bit of a dumb question here. Sorry folks.
Suppose I have this file which is being updated at irregular intervals (a few seconds, a few minutes, who knows) by a background process.
I 'vi' this file with the intention of editing it, so it opens up a temp copy as the usual... (8 Replies)
Discussion started by: Percy
8 Replies
2. UNIX for Dummies Questions & Answers
Hi
I know from reading O Riley's Classic Shell Scripting' that the .profile file is " the shells configuration file" but I am unable to find a reference to what "..profile" means. I have searched on the net, Sams Teach Yourself Unix, Unix Visual Quickstart Guide and Linux in a Nutshell. I have... (2 Replies)
Discussion started by: zorrokan
2 Replies
3. UNIX for Dummies Questions & Answers
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies
4. Shell Programming and Scripting
Dear friends, following is the output of a script from which I want to remove spaces and new-line characters.
Example:-
Line1 abcdefghijklmnopqrstuvwxyz
Line2 mnopqrstuvwxyzabcdefghijkl
Line3 opqrstuvwxyzabcdefdefg
Here in above example, at every starting line there is a “tab” &... (4 Replies)
Discussion started by: anushree.a
4 Replies
5. Shell Programming and Scripting
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Discussion started by: shis100
7 Replies
6. Shell Programming and Scripting
I have a bunch of random character lines like ABCEDFG. I want to find all lines with "A" and then change any "E" to "X" in the same line. ALL lines with "A" will have an "X" somewhere in it. I have tried sed awk and vi editor. I get close, not quite there. I know someone has already solved this... (10 Replies)
Discussion started by: nightwatchrenba
10 Replies
7. Shell Programming and Scripting
Okay, so I have a rather large text file and will have to process many more and this will save me hours of work.
I'm not very good at scripting, so bear with me please.
Working on Linux RHEL
I've been able to filter and edit and clean up using sed, but I have a problem with moving lines.
... (9 Replies)
Discussion started by: rex007can
9 Replies
8. Shell Programming and Scripting
Dear Ladies & Gents,
I have a requirement to delete all the log files in /var/log/test directory that are older than 10 days and their first line begin with "MSH" or "<?xml" or "FHS". I've put together the following BASH script, but it's erroring out:
for filename in $(find /var/log/test... (2 Replies)
Discussion started by: Hiroshi
2 Replies
9. Shell Programming and Scripting
Hi everybody,
I am new at Unix/Bourne shell scripting and with my youngest experiences, I will not become very old with it :o
My code:
#!/bin/sh
set -e
set -u
export IFS=
optl="Optl"
LOCSTORCLI="/opt/lsi/storcli/storcli"
($LOCSTORCLI /c0 /vall show | grep RAID | cut -d " "... (5 Replies)
Discussion started by: Subsonic66
5 Replies
10. Shell Programming and Scripting
Hi,
There are 2 users (T886072 & T864764) that need to be provided full (rwx) access to a directory. I made the changes to the directory permissions using chmod and setfacl :
root@digidb2:# chmod 700 /u02/ftpfiles/MFRS16/discount_rates/
root@digidb2:# setfacl -s... (3 Replies)
Discussion started by: anaigini45
3 Replies
LEARN ABOUT HPUX
pthread_once
pthread_once(3T) pthread_once(3T)
NAME
pthread_once() - call an initialization routine only once
SYNOPSIS
Parameters
once_control Pointer to the once-control object associated with the one-time initialization function
init_routine The one-time initialization routine. This routine is called only once, regardless of the number of times it and its associ-
ated once_control are passed to
DESCRIPTION
The function guarantees that is only called one time in an application. This function will use the once_control object to determine if has
previously been called via
The first time is called with once_control and causes to be called with no arguments. Subsequent calls to with the same once_control will
not cause to be called again. When returns, the caller is guaranteed that has been called (either just now or via a previous call).
The macro is used to statically initialize a once control block. This initialization must be done before calling
is not a cancellation point. However, the caller supplied may be a cancellation point. If the thread executing is canceled, the once_con-
trol argument will be set to a state which indicates that has not been called yet (see pthread_cancel(3T)). The next time the function is
called with once_control, the function will be called.
The behavior of is undefined if once_control has automatic storage duration or is not initialized by
RETURN VALUE
returns returns the following values:
Successful completion.
Failure.
An error number is returned to indicate the error. (The variable is not set.)
ERRORS
The following error value is returned by if the corresponding condition is detected.
Either once_control or init_routine is invalid.
EXAMPLES
Some modules are designed for dynamic initialization, i.e., global initialization is performed when the first function of the module is
invoked. In a single-threaded program, this is generally implemented as follows:
(Rest of the code after initialization.)
For a multithreaded process, a simple initialization flag is not sufficient; the flag must be protected against modification by multiple
threads. Consequently, this flag has to be protected by a mutex that has to be initialized only once, and so on. A multithreaded program
should use initialization similar to:
(Rest of the code after initialization.)
AUTHOR
was derived from the IEEE POSIX P1003.1c standard.
SEE ALSO
pthread_create(3T).
STANDARDS CONFORMANCE
Pthread Library pthread_once(3T)