Running the command:
would setup a set-UID environment in which it will run the command:
and exit. Doing that seems pointless (the redirections will disappear when the command sudo ran completes and no redirections will have occurred in the current shell execution environment that your script will return to when the sudo is done).
If you want to run a script in a set-UID environment so it can open files to be used by that script, you need to use something more like:
This User Gave Thanks to Don Cragun For This Post:
linux redhat 8.0
I am getting accustomed to using the -exec command to get around my databse.. and use it to edit and update files..! is this more apllicable than jumping from one directory to the other.. I have set up the databse so that the inode #'s are accessable and can get me from one... (0 Replies)
hai
i want know the difference between two shell scripts those are
1)
a=2004
echo $a #output------2004
exec < inputfile
while read line
do
echo $a #output-------2004
a=2005
echo $line
echo $a ... (1 Reply)
I have a ksh script that contains the following:
find /dir1/dir2 -type f -name "FILE.*" -newer /dir1/dir2/afterme.txt -exec cp /dir1/dir2/dir3 {} \;
When I run it from the cli, it runs fine. When I run it from the ksh script I get
find: missing argument to `-exec'
I also tried -exec cp... (40 Replies)
All,
I am using below shell script to output the content to outputfile.txt. What I am looking for is in addition to outputfile.txt, I want the output to be on standard output too.
exec > outputfile.txt
echo "Starting "
echo "ending" (5 Replies)
How can I use the exec command to log my korn shell session to the screen and the log file?
Currently I have this command:
$exec 1> ${LOG} 2>&1
This logs the output to the log file only. I want it to go to the screen also. Is this possible with this command?
thanks. (10 Replies)
Hi can some one explain the following command , It would really help if some can really elloborate on what is happening out here
export PATH | exec /bin/sh ./auto_approve :q
P.S: This is the first time i am using exec ,so an elloboration what does it do and what is the use of the :q will be... (1 Reply)
Hi,
I have the following lines in a script :
.
.
exec < some_file
.
.
.
I have very little idea about exec command. I would like to know what this does and what will happen if the file some_file does not exist. Specifically, I would like to know whether the lines following this... (5 Replies)
Hi all,
Forgive me for asking for help with my first post, but I am struggling here. I've been asked to translate a bash script into a Windows script (probably batch or powershell, not sure yet), so the first step is obviously understand what the bash script is doing. But I have no experience in... (5 Replies)
Hello.
From a script, a command for a test is use :
find /home/user_install -maxdepth 1 -type f -newer /tmp/000_skel_file_deb ! -newer /tmp/000_skel_file_end -name '.bashrc' -o -name '.profile' -o -name '.gtkrc-2.0' -o -name '.i18n' -o -name '.inputrc'
Tha command... (3 Replies)
Discussion started by: jcdole
3 Replies
LEARN ABOUT CENTOS
doveadm-exec
DOVEADM-EXEC(1) Dovecot DOVEADM-EXEC(1)NAME
doveadm-exec - easily execute commands from Dovecot's libexec_dir
SYNOPSIS
doveadm [-Dv] exec binary [binary arguments]
DESCRIPTION
This command allows administrators and local users to simply execute commands from within libexec_dir. So for example a logged in system
user could start a pre-authenticated imap session, using the command: doveadm exec imap. An administrator would use the command: doveadm
exec imap -u username.
OPTIONS
Global doveadm(1) options:
-D Enables verbosity and debug messages.
-v Enables verbosity, including progress counter.
ARGUMENTS
binary the name of an executable located in /usr/libexec/dovecot.
binary arguments
options and arguments, wich will be passed through to the binary.
EXAMPLE
This example demonstrates how to deliver a message from a file to a user's mailbox.
doveadm exec dovecot-lda -d user@example.net
-f admin@example.net < ~/stuff/welcome.msg
REPORTING BUGS
Report bugs, including doveconf -n output, to the Dovecot Mailing List <dovecot@dovecot.org>. Information about reporting bugs is avail-
able at: http://dovecot.org/bugreport.html
SEE ALSO doveadm(1), dovecot-lda(1)Dovecot v2.2 2013-08-05 DOVEADM-EXEC(1)