Sponsored Content
Top Forums Shell Programming and Scripting Very Strange Behavior for redirection Post 302130949 by cahook on Wednesday 8th of August 2007 11:32:19 AM
Old 08-08-2007
Thanks Guys

I appreciate the comments, they have all been helpful in that they addressed both of my troubles. I had forgotten the effect of running a program by sourcing it, and the information on redirecting the stderr was also very helpful as several examples on the web were done incorrectly. (That was were I found the syntax that is in my example)


Thanks again to everyone.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

strange sed behavior

I have a file called products.kp which contains, for example, 12345678,1^M 87654321,2^M 13579123,3 when I run the command cat products.kp| sed -f kp.sed where kp.sed contains s,^M,, I get the output 12345678,1 87654321,2 13579123,3 (5 Replies)
Discussion started by: Kevin Pryke
5 Replies

2. UNIX for Dummies Questions & Answers

Strange Behavior on COM2

Hi, I have a problem with a new touch screen controller that I am trying to use on a SCO 3.0 system. THe touch screen controller only wants to talk at 9600baud. I have updated /etc/inittab per the manual and also edited /usr/lib/event/devices to use 9600 baud. The only way I can get the... (0 Replies)
Discussion started by: Elwood51
0 Replies

3. Programming

Strange behavior in C++

I have the following program: int main(int argc, char** argv){ unsigned long int mean=0; for(int i=1;i<10;i++){ mean+=poisson(12); cout<<mean<<endl; } cout<<"Sum of poisson: "<< mean; return 0; } when I run it, I get the... (4 Replies)
Discussion started by: santiagorf
4 Replies

4. Red Hat

strange mail behavior

Hi I have script to to take backup and send mail to a group once a day. One strange behavior I have observed recently is that most of the time the mail we receive is fine . But someday it just sends out mail without any subject with undisclosed recipients. I dont know how to find the cause... (0 Replies)
Discussion started by: ningy
0 Replies

5. Shell Programming and Scripting

Insane redirection behavior

Hi guys, I know computers don't misbehave. But I'm puzzled by what's happening right know in a script : I simplified the example to point out what seems weird to me. Don't try to find any sense to this stupid script. There are 10 rows in /tmp/tmp.txt i=0 tmpfile=/tmp/tmp.txt while... (3 Replies)
Discussion started by: chebarbudo
3 Replies

6. AIX

Strange memory behavior

Hello together, i have a strange memory behavior on a AIX 7.1 System, which i cannot explain. The Filesystem-Cache will not be grow up and drops often after few minutes. I know if a file was deleted, that the same segment in the FS-Cache will also be cleared. But i am not sure if this is the... (8 Replies)
Discussion started by: -=XrAy=-
8 Replies

7. Shell Programming and Scripting

Strange behavior on one of my server

I am not sure what is wrong, but I have some strange behavior when printing things out. I do create a file with only one word test, no space, no new line etc. nano file<enter> test<ctrl x>y<enter> Server 1 gets (fail) awk '{print "+"$0"*"}' file *test Server 2 gets (OK) awk '{print... (9 Replies)
Discussion started by: Jotne
9 Replies

8. Shell Programming and Scripting

Strange behavior of grep

Hi All, I am facing a strange problem while grepping for a process. Here is the small script that i have written. It will look for any process running with the parameter passed to the script. If no process is running it should print appropriate message. $ cat t.ksh #!/bin/ksh set -x ... (9 Replies)
Discussion started by: veeresh_15
9 Replies

9. Shell Programming and Scripting

Strange Ctrl+C behavior

Hello All, I have a strange issue. I've created a shell script which connects to RMAN (Oracle Recovery Manager) and executes full DB backup. I then executed this script with nohup and in the background: $ nohup my_script.sh > logfile.log 2>&1 &The issue is that when I tried to take a look into... (6 Replies)
Discussion started by: JackK
6 Replies
snmpconf(1M)						  System Administration Commands					      snmpconf(1M)

NAME
snmpconf - creates and modifies SNMP configuration files SYNOPSIS
snmpconf snmpconf -g basic_setup snmpconf [options] [file_to_create] DESCRIPTION
The snmpconf utility is a simple script that walks you through setting up a configuration file, step-by-step. It works by asking you a series of questions. It creates the configuration file based on your responses. In its default mode of operation, snmpconf prompts you with menus showing sections of the various configuration files it knows about. When you selects a section, a submenu is shown listing the descriptions of the tokens that can be created in that section. When a description is selected, you are prompted with questions that determine the specification of the selected token. When you quit snmpconf, any configuration files that have been edited are saved to the local directory. snmpconf supplies comments in the configuration files for each change. A particularly useful option is the -g switch, which walks you through a specific set of configuration questions. For an example, invoke: # snmpconf -g basic_setup This command walks you through an initial setup of the snmpd daemon. OPTIONS
The following options are supported: -f Force overwriting existing files in the current directory without prompting the user. -i When finished, install the files in the location where the global system commands expect to find them. -p When finished, install the files into the user's home directory's .snmp subdirectory. Applications will search for configuration files in this location. -I directory When finished, install the files into the directory directory. -a Do not issue queries. Read in the various known configuration files and write them back out again. This has the effect of "auto-com- menting" the configuration files for you. -r all | none Read in either all or none of the found configuration files. Normally, snmpconf prompts you for which files you wish to read in. -R file,... Read in a specific list of configuration files. -g groupname Groups of configuration entries can be created that can be used to walk a user through a series of questions to create an initial con- figuration file. There are no menus to navigate, just a list of questions. The command: # snmpconf -g basic_setup provides a good example. -G List all the known groups. -c configdir snmpconf uses a directory of configuration information to learn about the files and questions that it should be asking. This option tells the utility to use a different location for configuring itself. -q Run slightly more quietly than the default. Because this is an interactive program, this option is not recommended. It removes informa- tion from the output that might be helpful to you. -d Turn on copious debugging output. -D Add more (beyond -d) debugging output in the form of Perl variable dumps. EXAMPLES
Example 1: Adding Comments to snmpd.conf The following command reads in an snmpd.conf file and adds comments describing what each token does. # snmpconf -R /etc/sma/snmp/snmpd.conf -a -f snmpd.conf EXIT STATUS
0 Successful completion. 1 A usage syntax error. A usage message displays. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWsmcmd | +-----------------------------+-----------------------------+ |Interface Stability |External | +-----------------------------+-----------------------------+ SEE ALSO
snmpd(1M), snmpd.conf(4), snmp_config(4), attributes(5) SunOS 5.10 20 Jan 2004 snmpconf(1M)
All times are GMT -4. The time now is 01:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy