Sponsored Content
Top Forums Shell Programming and Scripting stop logging when executing a script Post 302228328 by era on Sunday 24th of August 2008 01:11:11 AM
Old 08-24-2008
Bash scripts do not normally cause anything to be logged anywhere. Perhaps you can describe the scenario and environment where this is happening in a bit more detail.

On a hunch, I'm guessing you might be talking about a cron job or similar which generates output which then gets sent to the administrator. In general terms, you can suppress regular output by redirecting it to /dev/null, like so:

Code:
verbosecommand >/dev/null

If verbosecommand is correctly implemented, error messages will not be suppressed by this redirection (this is why we have separate "standard output" and "standard error"; the above discards only the "standard output").
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

logging as su from script

Hi, I am running a script where i need to run another command in a particular folder which I do not have access so I need to login as su to that folder and run that script...what are the options I need so that I can skip interactive mode ..here is what I tried.. #! /usr/bin/sh... (2 Replies)
Discussion started by: mgirinath
2 Replies

2. Solaris

editing syslog to stop a particular daemon logging

Hi there I get the following message im my messages file 2 or 3 times a second Dec 4 11:44:18 my-box in.timed: connect from localhost I would like to stop in.timed from logging to syslog altogether as this message is filling up my disk. I dont want to stop daemon.info altogether... (0 Replies)
Discussion started by: hcclnoodles
0 Replies

3. Solaris

stop wtmpx logging

Hello One of our applications initiates an ftp logon to itself twice every second ...(to check some files or something im not sure) but every time it does this it logs an entry into the wtmpx database, this file is now getting absolutely huge and whilst I know that I could implement some type of... (1 Reply)
Discussion started by: hcclnoodles
1 Replies

4. Shell Programming and Scripting

How to stop a script running in remote server from local script

Hi, I have googled for quite some time and couldn't able to get what exactly I am looking for.. My query is "how to stop a shell script which is running inside a remote server, using a script"??? can any one give some suggestions to sort this out. (1 Reply)
Discussion started by: mannepalli
1 Replies

5. Shell Programming and Scripting

Executing scipts after logging into a remote host using shell script

Hi All, Sorry if it is a duplicate post. I have not got any reference about this anywhere. I looked at the posts described in SSH - Passing Unix login passwords through shell scripts - Linux / UNIX Forum and it helped me till the point to connect to the host and executing the basic commands.... (3 Replies)
Discussion started by: RSC1985
3 Replies

6. Shell Programming and Scripting

Stop child script by stoping parent script

Hi everyone, I have this problem with a script I'm writting. I want to execute a code running in the background several times through a script. I am writting it like that parent_script for a in 1 2 3 4 5 do exec test -n $a done What I want to do is when parent_script is killed,... (0 Replies)
Discussion started by: geovas
0 Replies

7. Shell Programming and Scripting

Logging Script!!!

I am trying to write a script that can be called by other scripts to print output to a log. I also want to be able to rotate the log file for this script with a max of 5 logs files. This is what I have so far: #/bin/ksh . /taipso75/scripts/IPSM_run_profile.sh* log=${IPSM_HOME}/log ( echo... (1 Reply)
Discussion started by: Dougj75
1 Replies

8. Web Development

How to stop my the logging of my IP address?

A Gbytes long log /var/log/apache2/access_log causes my question: How to stop my IP logging (just because of frequent AJAX/setTimeout). As config: SetEnvIf Remote_Addr "ip\.ip\.ip\.ip" dontlog CustomLog /var/log/apache2/access_log common env=!dontlog In /etc/apache2/httpd.conf ... (0 Replies)
Discussion started by: Xcislav
0 Replies

9. Linux

Syslog not logging successful logging while unlocking server's console

When unlocking a Linux server's console there's no event indicating successful logging Is there a way I can fix this ? I have the following in my rsyslog.conf auth.info /var/log/secure authpriv.info /var/log/secure (1 Reply)
Discussion started by: walterthered
1 Replies

10. Linux

Set -n doesn't stop executing

When I do "set -n" or "set -o noexec" the shell doesn't do what it sould. Infact if I check: $: set -o .... noexec off .... f ...instead I can set normally the other option. Who Knows what could be up? (2 Replies)
Discussion started by: flaviofachin
2 Replies
RSH(1)							    BSD General Commands Manual 						    RSH(1)

NAME
rsh -- remote shell SYNOPSIS
rsh [-46dn] [-l username] [-t timeout] host [command] DESCRIPTION
The rsh utility executes command on host. The rsh utility copies its standard input to the remote command, the standard output of the remote command to its standard output, and the standard error of the remote command to its standard error. Interrupt, quit and terminate signals are propagated to the remote command; rsh normally terminates when the remote command does. The options are as follows: -4 Use IPv4 addresses only. -6 Use IPv6 addresses only. -d Turn on socket debugging (using setsockopt(2)) on the TCP sockets used for communication with the remote host. -l username Allow the remote username to be specified. By default, the remote username is the same as the local username. Authorization is deter- mined as in rlogin(1). -n Redirect input from the special device /dev/null (see the BUGS section of this manual page). -t timeout Allow a timeout to be specified (in seconds). If no data is sent or received in this time, rsh will exit. If no command is specified, you will be logged in on the remote host using rlogin(1). Shell metacharacters which are not quoted are interpreted on local machine, while quoted metacharacters are interpreted on the remote machine. For example, the command rsh otherhost cat remotefile >> localfile appends the remote file remotefile to the local file localfile, while rsh otherhost cat remotefile ">>" other_remotefile appends remotefile to other_remotefile. FILES
/etc/hosts /etc/auth.conf SEE ALSO
rlogin(1), setsockopt(2), rcmd(3), ruserok(3), auth.conf(5), hosts(5), hosts.equiv(5), rlogind(8), rshd(8) HISTORY
The rsh command appeared in 4.2BSD. BUGS
If you are using csh(1) and put a rsh in the background without redirecting its input away from the terminal, it will block even if no reads are posted by the remote command. If no input is desired you should redirect the input of rsh to /dev/null using the -n option. You cannot run an interactive command (like ee(1) or vi(1)) using rsh; use rlogin(1) instead. Stop signals stop the local rsh process only; this is arguably wrong, but currently hard to fix for reasons too complicated to explain here. BSD
October 16, 2002 BSD
All times are GMT -4. The time now is 11:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy