Hi.
What does this command do in the shell script?
#!/bin/ksh
I have some scripts which do not run if this line is removed. First I thought it is comment but I think it sets up korn as shell.
Sanjay (2 Replies)
Hi,
I wrote scripting to perform some jobs. (eg, run_job)
Everything works ok when i tested it on my side.
I execute the run_job manually and it works perfectly ok.
When my administrator try to run it using a scheduler job.
He encountered problem of running it.
He said it might be due to... (1 Reply)
Can you please tell me what the command "#!/bin/ksh -e" means?
I tried running a ksh script with "#!/bin/ksh -e" as starting line, and with "#!/bin/ksh" as starting line - they behave differently..
Thanks!
Ramya (2 Replies)
Hi All,
I have a shell (#!/bin/sh) with below piece of code:
if !
then
echo Staging table ABC_INT_TAB is not present in the schema >> $OUTPUT
fi
Shell is throwning below error and continue to work even after this error... (3 Replies)
Hi,
Could someone pls help me on the below command:
if
then
------------------
------------
fi
if
then
-------------
-------------------
-------------------
fi
What does this signify?
Thanks,
.. (4 Replies)
we have a shell script that we are using in KSH
if ]; then
_IFS=$IFS
IFS=:
and it's failing on /bin/sh . Is there a simple way to modify it to work on both . ( not with awk)
Thanks in adv (3 Replies)
Hi,
I have a problem I don't understand with fuser.
I launch a simple shell script mysleep.sh:
I launch the command fuser -fu mysleep.sh but fuser doesn't return anything excepted:
mysleep:
Then I modify my script switching from #!/bin/sh to #!/bin/ksh
I launch the command fuser -fu... (4 Replies)
Could you please help me out in letting me know the meaning of
#!/bin/sh
#!/bin/ksh
#!/bin/bash
what the difference between all these :eek:....
Also please view the below mention script, could you please explain whats this script doing
#!/bin/bash
t=100
echo $t
echo $tea
echo... (4 Replies)
Hi,
In the beginning of Shell script, we give a statement like
#!/bin/ksh
I have 2 questions related to this,
1) It could denote about the shell we want to use, what is the real usage of this? My shell script works even without this statement, is it a mandatory one.
2) I'm using... (7 Replies)
Discussion started by: Dev_Dev
7 Replies
LEARN ABOUT ULTRIX
setrgid
setuid(3) Library Functions Manual setuid(3)Name
setuid, seteuid, setruid, setgid, setegid, setrgid - set user and group ID
Syntax
#include <sys/types.h>
#include <unistd.h>
setuid(uid)
uid_t uid;
seteuid(euid)
uid_t euid;
setruid(ruid)
uid_t ruid;
setgid(gid)
gid_t gid;
setegid(egid)
gid_t egid;
setrgid(rgid)
gid_t rgid;
Description
The subroutine sets both the real and effective user ID of the current process to the ID specified. Likewise, the subroutine sets the real
and effective group ID of the current process to the ID specified.
The subroutine sets the effective user ID of the current process, while the subroutine sets the effective group ID of the current process.
The subroutine sets the real user ID of the current process, while the subroutine sets the real group ID of the current process.
These calls are only permitted to the super-user or if the argument is the real or effective ID.
Environment
POSIX
SYSTEM_FIVE
When your program is compiled in POSIX or System V mode the following semantics apply when using the or functions:
If the process is the super-user the real, effective, and saved set (as described in user/group ID are set to uid.
If the process is not the super-user, but uid is equal to the real or the saved set user/group ID, the effective user/group ID is set to
uid. The real and saved set user/group ID remain unchanged.
POSIX
In POSIX mode, the function returns a value of type uid_t. The function returns a value of type gid_t.
Return Values
Zero is returned if the user ID or group ID is set; -1 is returned otherwise.
See Alsosetreuid(2), setregid(2), getuid(2), getgid(2)setuid(3)