In ksh I thought a global variable was any variable in a script or function that did not have the typeset command. I have a global in my calling script which I increment in a function, but the value does not change in the calling script. Here is the code:
function f_open_log
{
typeset -r... (5 Replies)
Hi Guys,
My requirement is I have file called /opt/orahome/.profile in non global zone.
PATH=/usr/bin:/usr/ucb:/etc:/usr/sbin:/usr/local/bin:/usr/openwin/bin:.
export PATH
PS1="\${ORACLE_SID}:`hostname`:\$PWD$ "
export PS1
EDITOR=vi
export EDITOR
ENV=/opt/orahome/.kshrc
export ENV... (1 Reply)
Hi,
I heard about some global commands for information gathering in UNIX systems. some commands which will execute on a UNIX system in a local network and other systems will reply to these command with some information about themselves.
for example, from one of those UNIX machines (in a... (15 Replies)
I am wondering what way, I can remove a certain text with nothing.
for example:
MyVariable=Y7UHNI
to only:
Y7UHNI
removing 'MyVariable=' globally?
thanks (1 Reply)
Defined a user alias in unix. Not able to use that alias in a ksh scritp. I dont want to change/source in the script to set the value. Need to set the user alias as a gloabal alias to use it in a new ksh shell window. Can you please help on this? (3 Replies)
Hello -
I am trying to use a global replace command but its not working.
Here is the cmd I am using in vi:
:%s/OLD/NEW/g
However, in my "NEW" I already have a "/" which is not making the replace work:
:%s/mytestscript.com:33232/mytestscript:70245/test.com/g
the... (2 Replies)
Below is my code:
count=0
if
...
...
else
...
find * -prune -type d | sort -r -n | while read d; do
count=1
if ; then
echo "Count1:$count"
...
...
break 2;
fi
...
done
...
fi
echo "Count2:$count" (9 Replies)
hi all,
Just a simple question but i cant get the answers in the book -
In my globalzone , assuming i have 4 cpus (psrinfo -pv = 0-3), if i set dedicated-cpu (ncpus=2) for my local zone
Is my globalzone left with 2 cpus or still 4 cpus ? Does localzone "resource reservation.e.g. cpu in... (6 Replies)
Discussion started by: javanoob
6 Replies
LEARN ABOUT NETBSD
do_setresgid
DO_SETRESUID(9) BSD Kernel Developer's Manual DO_SETRESUID(9)NAME
do_setresuid, do_setresgid -- set process uid and gid
SYNOPSIS
#include <sys/ucred.h>
int
do_setresuid(struct lwp *lwp, uid_t ruid, uid_t euid, uid_t svuid, u_int flags);
int
do_setresgid(struct lwp *lwp, uid_t ruid, uid_t euid, uid_t svuid, u_int flags);
DESCRIPTION
The do_setresuid and do_setresgid functions are used to implement the various system calls that allow a process to change its real, effec-
tive, and saved uid and gid values.
The do_setresuid function sets the specified processes real user ID to ruid, its effective user ID to euid, and its saved user ID to svuid.
If any of the uid arguments are -1 then that assignment is skipped.
If suser() is true, then any values may be assigned, otherwise the new uid values must match one of the existing values and the caller must
have set the relevant bit in flags.
The flags argument specifies which of the existing uid values the new value must match. It should be set to a logical OR of
ID_{R,E,S}_EQ_{R,E,S}, where ID_E_EQ_R means that it is valid to set the effective ID to the current value of the real ID.
The do_setresgid function sets the group IDs but otherwise behaves in the same manner as do_setresuid. The processes group list is neither
examined nor effected.
SEE ALSO setregid(2), setreuid(2), setuid(2), suser(9)CODE REFERENCES
These functions are implemented in: sys/kern/kern_prot.c.
HISTORY
Implemented for NetBSD 2.0 to replace ad-hoc code in each system call routine and in the various compat modules.
BSD September 28, 2003 BSD