03-30-2001
To execute another script from a script.
Test if the script exist and then call the script.
for example:
if [ -r ~/.myscript]; then      // see "man [" -r means "True if file exists and is readable"
    . ~/.myscript                 // call .myscript
fi
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All
I am new to unix.
I need a shell script to load a datafile in to oracle.
I already have a control file, and data file. all I need is if i execute the shell it must load the data using the ctl file to table.
Control file : PAY0001.ctl
Datafile : mon_grs_det.dat
log file :... (3 Replies)
Discussion started by: raghuraja_r
3 Replies
2. Shell Programming and Scripting
Hi All,
I am trying to load a data from a files in a particular directory to a database..
cd $SCC
isql metdb >> ${LOGDATA}/LOAD.LOG < !
load from "${LDATA}/${FORM}.ld" insert into $LOADTABLE
!
But it's showing the error "syntax error at line 46 : `<<' unmatched"
Can u plz help me... (5 Replies)
Discussion started by: grajesh_955
5 Replies
3. Shell Programming and Scripting
Hi, how to create an exe out of a perl script.Even if it is possible how secure is it? Are there other softwares to decryprt a perl exe and get the source code out of it ? (7 Replies)
Discussion started by: Anuj8584
7 Replies
4. UNIX for Advanced & Expert Users
asdfasdfasdfasdf??? (2 Replies)
Discussion started by: noorm
2 Replies
5. Shell Programming and Scripting
Hello forum memebers.
I have command which is exe of C- program from my script.i am writing a script which is under path /abc/xyz/test.sh.
the script consist the command which is the exe of c-prog and the exe is present in the /abc/xyz/bin.if run the command from the /abc/xyz its running and if... (3 Replies)
Discussion started by: rajkumar_g
3 Replies
6. Shell Programming and Scripting
Folks ,
can anyone post a sample showing a way to parse a variable containing a string to a .exe file .
Thanks
Venu (2 Replies)
Discussion started by: venu
2 Replies
7. Shell Programming and Scripting
Hi All,
I am trying to write a shell script in which the contents of a small tar file is loaded into a variable and the same variable contents is moved into another file and finally untaring of the newly created file is done.
The Shell Script is as follows:
#----Start Of The... (11 Replies)
Discussion started by: wini008
11 Replies
8. Shell Programming and Scripting
Hi,
Can you please tell me the Unix shell script for removing footer from the datafile while loading into external table using sqlloader
we will be skipping the header like this while creating the table
organization external
(
type oracle_loader
default directory directoryname... (5 Replies)
Discussion started by: srikanth_sagi
5 Replies
9. Shell Programming and Scripting
I have to run some shell scripts in Windows using Cygwin. I am able to achieve that using
%BASH% --login -i "/cygdrive/d/script.sh"
, where %BASH% is an environment variable in Windows set to
C:\cygwin\bin\bash.exe.
I have a created a Cygwin environment variable $EXE_PATH =... (3 Replies)
Discussion started by: HemanthJayasimh
3 Replies
10. Shell Programming and Scripting
Hi,
I have the following requirement:
I have load_cdr as main scriptwhich loads all the file records into vertica database through unix script. But there are two files which try to update same table..n thats y my script is getting failed...
Can any1 give me some logic how to over come this... (6 Replies)
Discussion started by: gnnsprapa
6 Replies
SETUID(1) General Commands Manual SETUID(1)
NAME
setuid - run a command with a different uid.
SYNOPSIS
setuid username|uid command [ args ]
DESCRIPTION
Setuid changes user id, then executes the specified command. Unlike some versions of su(1), this program doesn't ever ask for a password
when executed with effective uid=root. This program doesn't change the environment; it only changes the uid and then uses execvp() to find
the command in the path, and execute it. (If the command is a script, execvp() passes the command name to /bin/sh for processing.)
For example,
setuid some_user $SHELL
can be used to start a shell running as another user.
Setuid is useful inside scripts that are being run by a setuid-root user -- such as a script invoked with super, so that the script can
execute some commands using the uid of the original user, instead of root. This allows unsafe commands (such as editors and pagers) to be
used in a non-root mode inside a super script. For example, an operator with permission to modify a certain protected_file could use a
super command that simply does:
cp protected_file temp_file
setuid $ORIG_USER ${EDITOR:-/bin/vi} temp_file
cp temp_file protected_file
(Note: don't use this example directly. If the temp_file can somehow be replaced by another user, as might be the case if it's kept in a
temporary directory, there will be a race condition in the time between editing the temporary file and copying it back to the protected
file.)
AUTHOR
Will Deich
local SETUID(1)