If I wanted to cancel this behaviour later in the script, how would I do that?
Depends what you mean by cancel.
If you simply want to discard output and error messages so that they cease to appear in the logs, you can redirect to /dev/null (although this will not affect any commands that are already logging and running).
If instead you would like to revert output and errors to their original destinations, you'll have to use exec to save the original locations.
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)
I have the following bash script lines in a file named test.sh.
#!/bin/bash
#
# Write Date to cron.log
#
echo "Begin SSI Load $(date +%d%b%y_%T)"
#
# Get the latest rates file for processing.
#
d=$(ls -tr /rms/data/ssi | grep -v "processed" | tail -n 1)
filename=$d
export filename... (3 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 DEBIAN
cancelmsg
CANCELMSG(1) Double Precision, Inc. CANCELMSG(1)NAME
cancelmsg - Cancel an E-mail message
SYNOPSIS
cancelmsg {msgid} ["reason"]
DESCRIPTION
cancelmsg removes a message from the mail queue. There will be no more attempts to deliver this message, and a standard delivery failure
notice is sent to the return address listed on the message. You can only cancel your own messages. The superuser can cancel any message. An
attempt to cancel a message will fail if the message has already been sent (of course), or if a delivery attempt is currently in progress.
Because a delivery attempt is usually started as soon as an E-mail message is added to the mail queue, a cancellation attempt is only
effective if the message cannot be immediately delivered for some reason, or if the system is very busy and is working on a mail backlog.
cancelmsg works by marking all pending recipients as undeliverable. A non-delivery report is then generated and sent in the normal fashion.
msgid is the message queue id that can be obtained from the mailq(1)[1], command. A reason is optional. The message does not disappear into
a black void. The message will be returned as undeliverable, citing reason. A generic error message will be used if reason is not
specified.
BUGS
A non-delivery report may not be sent immediately, but delayed until the message's turn comes up in the scheduling queue.
There is no immediate indication if the message cancellation worked. A subsequent non-delivery report is the only indication of a
successful cancel. If it doesn't come, it means the message wasn't cancelled in time.
A non-delivery report will not be sent for recipients whose delivery status notification does not include the FAIL notice.
SEE ALSO mailq(1)[1], courier(8)[2].
AUTHOR
Sam Varshavchik
Author
NOTES
1.
mailq(1)
[set $man.base.url.for.relative.links]/mailq.html
2.
courier(8)
[set $man.base.url.for.relative.links]/courier.html
Courier Mail Server 08/30/2011 CANCELMSG(1)