How do I create a K Shell which would silently (without user input) logon to Oracle and
run an SQL script?
Any help will be greatly appreciated.
Steve (1 Reply)
I have a command which will run fine in a unix command prompt. Can you tell how to interprete this command inside perl script......
The command is :
perl -pe 's/(\|333\}.*)\}$/$1|1.6}/' FIA.txt
This will search for the number 333 and appends 1.6 at the end of that line....... (1 Reply)
Hi everyone,
when executing this command in unix:
echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error.
here is content of my script:
tdbsrvr$ vi hc.sh
"hc.sh" 22 lines, 509... (4 Replies)
There's a JavaScript file that I call from command line (there's a framework) like so:
./RunDiag.js param1:'string one here' param2:'string two here'
I have a shell script where I invoke the above command. I can run it in a script as simple as this
#!/bin/bash
stuff="./RunDiag.js... (4 Replies)
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)
Hi,
I would like to run following code in bash inside a zsh script. (In this case is output unfortunately very different if you run it in zsh).
I tried to put "bash" in front of the code but I obtained following error message "bash: do: No such file or directory
" eve though I merged the whole... (7 Replies)
I have bash shell script which is internally calling python script.I would like to know how long python is taking to execute.I am not allowed to do changes in python script.Please note i need to know execution time of python script which is getting executed inside shell .I need to store execution... (2 Replies)
I am trying to run an awk command inside of ssh and it is not working. These are AIX servers.
for i in `cat servers`; do ssh $i "/bin/hostname; df -g | awk '/dev/ && $4+0 > 70'"; done
server1
server2
server3
server4
I also tried these two methods and they did not work. It just seemed... (5 Replies)
Discussion started by: cokedude
5 Replies
LEARN ABOUT PLAN9
setuid
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)