how to omit the output of the at now command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting how to omit the output of the at now command
# 1  
Old 08-16-2012
how to omit the output of the at now command

Hi Everyone,

I'm invoking the following command by a script:

Code:
at now < /home/d01plmi1/rep/start_replication.sh   >  /dev/null/  2>&1

but everytime is runs it put a message into the mail box of the userid executing the command. How can I redirect this so I can stop these notifications going to the mail account. thanks.

Harby

Last edited by Franklin52; 08-16-2012 at 07:17 AM.. Reason: Please use code tags for data and code samples
# 2  
Old 08-16-2012
According to the POSIX standard, (even though you have redirected stdout and stderr) an implementation is allowed (but not required) to send mail to the user submitting the job when the job completes that specifies the job completion status. There is no standard way to turn off this optional job termination notification, but the at(1) man page on your system may specify a way to do this.
# 3  
Old 08-19-2012
Thanks Don for your reply. If it can't be done well I have to find another way to execute this command. This is a replication start up script and for some reason when I was executing it just by using the below wasn't working at all as it was just hanging:


ksh /home/d01plmi1/rep/start_replication.sh

thanks again!!
# 4  
Old 08-19-2012
Is it possible that at is executing the command with stdin redirected from /dev/null? If running the script manually results in it 'hanging' it's quite possible that it, or a command it invokes, is waiting to read something from stdin without a prompt.

You might try:
Code:
ksh /home/d01plmi1/rep/start_replication.sh </dev/null

to see if that makes a difference.
# 5  
Old 08-19-2012
Thanks but doesn't work either. I did try redirecting the output using most of the common alternatives but without luck. The at now command seems to be the handy one as basically the script is just submiting the command without having to sit there and wait.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Insert title as output of command to appended file if no output from command

I am using UNIX to create a script on our system. I have setup my commands to append their output to an outage file. However, some of the commands return no output and so I would like something to take their place. What I need The following command is placed at the prompt: TICLI... (4 Replies)
Discussion started by: jbrass
4 Replies

2. Shell Programming and Scripting

Combine/omit data from 2 files

i made a script on my own. this is for the inventory to all of my AWS servers, and i run it to all of my servers to get the hostname, please look at file2. Then i need some data in file3 as well,. i need to combine them #cat file1 192.10.1.41 server.age.com ###### 192.10.0.40 ssh cant... (10 Replies)
Discussion started by: kenshinhimura
10 Replies

3. Shell Programming and Scripting

awk command to omit trailer record in a file

I am trying to omit the trailer record in a variable width file I tried using awk 'NR >1 { print prev } { prev = $0 }' filename The above command is giving output but somehow it is trimming columns from the record. For example if my record has columns A,B,C,D The awk gives output as A,B,C ... (4 Replies)
Discussion started by: abhilashnair
4 Replies

4. UNIX for Dummies Questions & Answers

Last line omit

I have a csv file "file.csv" which has 5 records but when I check record count for file.csv in unix it shows as 6, the last line is empty and I need to omit and need for processing. Kindly help. Thanks (6 Replies)
Discussion started by: Prashanth B
6 Replies

5. Shell Programming and Scripting

How to omit a part of the string

I have a file, f1 with content: File f1: abc_English_Dlr def_123_English_Dlr qwe_98_yu_English_Dlr dsw_1_English_Dlr I want to remove "_English_Dlr" from it. I used cut command but the problem is there may be a case for getting 1 or more fields before _English_Dlr . So Cut... (8 Replies)
Discussion started by: karumudi7
8 Replies

6. Shell Programming and Scripting

using awk to omit certain characters

I have a file called file.txt with multiple lines in them. I'm trying to remove the first 2 characters and the last 2 with awk. '.batman') '.superman') '.dragonheart') .'superduper') I tried doing the following and able to get rid of the first two characters. How do I remove the trailing... (5 Replies)
Discussion started by: zerofire123
5 Replies

7. Shell Programming and Scripting

Command to list only files omit directories.

Hi All I am writting a script that does a comparison between files in 2 diffectent directories. To do this I need a command that will list out only the files in a give directory and omit any sub dorectories with that directory. But I am unable to find it. Please Help. I tried ls... (5 Replies)
Discussion started by: Veenak15
5 Replies

8. UNIX for Dummies Questions & Answers

Command display output on console and simultaneously save the command and its output

Hi folks, Please advise which command/command line shall I run; 1) to display the command and its output on console 2) simultaneous to save the command and its output on a file I tried tee command as follows; $ ps aux | grep mysql | tee /path/to/output.txt It displayed the... (7 Replies)
Discussion started by: satimis
7 Replies

9. UNIX for Dummies Questions & Answers

Using cp -r command to selectively omit *.dat files while copying a directory.

Hi all, I want to copy a directory named Ec1 to another directory named Ec2, newly created. But Ec1 has a bunch of *.dat files and many many other kinds of files. Whle creating Ec2, I selectively want to omit the *.dat files since they are huge files of the order of 100 MBs and there are... (5 Replies)
Discussion started by: d_sai_kumar
5 Replies

10. UNIX for Dummies Questions & Answers

Omit repeating lines

Can someone help me with the following 2 objectives? 1) The following command is just an example. It gets a list of all print jobs. From there I am trying to extract the printer name. It works with the following command: lpstat -W "completed" -o | awk -F- '{ print $1}' Problem is, I want... (6 Replies)
Discussion started by: TheCrunge
6 Replies
Login or Register to Ask a Question