Sponsored Content
Top Forums Shell Programming and Scripting How redirect standard output to a file Post 302424047 by chaditya on Monday 24th of May 2010 04:50:07 AM
Old 05-24-2010
1) It isn't working could anybody suggest any other answer ??

2) Also i have input queries while the script is running how can i redirect the entire standard output expect that input parameter queries for the script so that these user can see input parameter queries at the command line itself ??

--- Aditya

Quote:
Originally Posted by Scrutinizer
Try:
Code:
echo "Print it 1"
isql -Uusername -Ppassword -Sserver > logfile <<-EOF
print "Print it 2"
EOF

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

redirect standard error into log file

Hi, I am new in shell scripting. Can anyone point out what wrong of below script. If I want the error output to "sqlerror.log" and database pool data output to "bulk_main.dat". Right now, the below script, if successful execute, the data will output to bulk_main.dat && sqlerror.log both... (7 Replies)
Discussion started by: epall
7 Replies

2. Shell Programming and Scripting

file content to standard output from a script

hi folks how do i output contents of file in standard output. in my script, i say x=`cat filename' echo $x below is the actual file *********** asda afdf fdf sdf dsfsdfsd fds dsfdfsdfsdg ssgd sgdg sdfsdgfsdg dgfd gsfd gs sdg sfdg s in my script, i am trying to output the... (4 Replies)
Discussion started by: bryan
4 Replies

3. UNIX for Dummies Questions & Answers

Question from a newbie. How to redirect standard output

I have a program that is sending error text to the console and I need to redirect that output to a log file. I'm brand new to Unix and don't know how to do this. Any direction would be greatly appreciated. (1 Reply)
Discussion started by: ndemos
1 Replies

4. Shell Programming and Scripting

redirect only the standard error output to mail

I'm writing a script using file descriptor 2 (std error) to send an email only if the command fails or errors out but the script always emails me irrepective of whether it fails or not. It will not email the /tmp/check.error file output if doesn't error out just the mail with the subject "Cannot... (3 Replies)
Discussion started by: barkath
3 Replies

5. Programming

Redirect Standard Output Multi-Process

Hi, I'm trying to compile the following code: /************** Begin <test.c> ***************/ /* * Compiled with: gcc -Wall -o test test.c */ #include <stdio.h> #include <unistd.h> int main(void) { printf("I'm process %d, son of %d \n", getpid(), getppid()); ... (5 Replies)
Discussion started by: djodjo
5 Replies

6. Shell Programming and Scripting

Sed does not make changes in the file but to the standard output

I have an xml file. I am doing some change, say deleting line 770. File name is file.xml. I use: sed '770d' file.xml but this does not actually make changes in the *file* but shows the changes on standard output (screen) if i use $var=`sed '770d' file.xml` echo $var > file.xml this... (3 Replies)
Discussion started by: indianjassi
3 Replies

7. UNIX for Dummies Questions & Answers

Redirect Standard output and standard error into spreadsheet

Hey, I'm completely new at this and I was wondering if there is a way that I would be able to redirect the log files in a directories standard output and standard error into and excel spreadsheet in anyway? Please remember don't use too advanced of terminology as I just started using shell... (6 Replies)
Discussion started by: killaram
6 Replies

8. Shell Programming and Scripting

script to mail monitoring output if required or redirect output to log file

Below script perfectly works, giving below mail output. BUT, I want to make the script mail only if there are any D-Defined/T-Transition/B-Broken State WPARs and also to copy the output generated during monitoring to a temporary log file, which gets cleaned up every week. Need suggestions. ... (4 Replies)
Discussion started by: aix_admin_007
4 Replies

9. Red Hat

Command understanding the output file destination in case of standard output!!!!!

I ran the following command. cat abc.c > abc.c I got message the following message from command cat: cat: abc.c : input file is same as the output file How the command came to know of the destination file name as the command is sending output to standard file. (3 Replies)
Discussion started by: ravisingh
3 Replies

10. Shell Programming and Scripting

Redirect script output to a file and mail the output

Hi Guys, I want to redirect the output of 3 scripts to a file and then mail the output of those three scripts. I used below but it is not working: OFILE=/home/home1/report1 echo "report1 details" > $OFILE =/home/home1/1.sh > $OFILE echo... (7 Replies)
Discussion started by: Vivekit82
7 Replies
NSD(8)								    NSD 3.2.12								    NSD(8)

NAME
nsd - Name Server Daemon (NSD) version 3.2.12. SYNOPSIS
nsd [-4] [-6] [-a ip-address[@port]] [-c configfile] [-d] [-f database] [-h] [-i identity] [-I nsid] [-l logfile] [-N server-count] [-n noncurrent-tcp-count] [-P pidfile] [-p port] [-s seconds] [-t chrootdir] [-u username] [-V level] [-v] DESCRIPTION
NSD is a complete implementation of an authoritative DNS nameserver. Upon startup, NSD will read the database specified with -f database argument and put itself into background and answers queries on port 53 or a different port specified with -p port option. The database must be generated beforehand with zonec(8). By default, NSD will bind to all local interfaces available. Use the -a ip-address[@port] option to specify a single particular interface address to be bound. If this option is given more than once, NSD will bind its UDP and TCP sockets to all the specified ip-addresses separately. If IPv6 is enabled when NSD is compiled an IPv6 address can also be specified. OPTIONS
All the options can be specified in the configfile ( -c argument), except for the -v and -h options. If options are specified on the com- mandline, the options on the commandline take precedence over the options in the configfile. Normally NSD should be started with the `nsdc(8) start` command invoked from a /etc/rc.d/nsd.sh script or similar at the operating system startup. -4 Only listen to IPv4 connections. -6 Only listen to IPv6 connections. -a ip-address[@port] Listen to the specified ip-address. The ip-address must be specified in numeric format (using the standard IPv4 or IPv6 notation). Optionally, a port number can be given. This flag can be specified multiple times to listen to multiple IP addresses. If this flag is not specified, NSD listens to the wildcard interface. -c configfile Read specified configfile instead of the default /etc/nsd3/nsd.conf. For format description see nsd.conf(5). -d Turn on debugging mode, do not fork, stay in the foreground. -f database Use the specified database instead of the default of /var/lib/nsd3/nsd.db. If a zonesdir: is specified in the config file this path can be relative to that directory. -h Print help information and exit. -i identity Return the specified identity when asked for CH TXT ID.SERVER (This option is used to determine which server is answering the queries when they are multicast). The default is the name returned by gethostname(3). -I nsid Add the specified nsid to the EDNS section of the answer when queried with an NSID EDNS enabled packet. -l logfile Log messages to the specified logfile. The default is to log to stderr and syslog. If a zonesdir: is specified in the config file this path can be relative to that directory. -N count Start count NSD servers. The default is 1. Starting more than a single server is only useful on machines with multiple CPUs and/or network adapters. -n number The maximum number of concurrent TCP connection that can be handled by each server. The default is 10. -P pidfile Use the specified pidfile instead of the platform specific default, which is mostly /var/run/nsd3/nsd.pid. If a zonesdir: is speci- fied in the config file, this path can be relative to that directory. -p port Answer the queries on the specified port. Normally this is port 53. -s seconds Produce statistics dump every seconds seconds. This is equal to sending SIGUSR1 to the daemon periodically. -t chroot Specifies a directory to chroot to upon startup. This option requires you to ensure that appropriate syslogd(8) socket (e.g. chrootdir /dev/log) is available, otherwise NSD won't produce any log output. -u username Drop user and group privileges to those of username after binding the socket. The username must be one of: username, id, or id.gid. For example: nsd, 80, or 80.80. -V level This value specifies the verbosity level for (non-debug) logging. Default is 0. -v Print the version number of NSD to standard error and exit. NSD reacts to the following signals: SIGTERM Stop answering queries, shutdown, and exit normally. SIGHUP Reload the database. SIGUSR1 Dump BIND8-style statistics into the log. Ignored otherwise. FILES
/var/lib/nsd3/nsd.db default NSD database /var/run/nsd3/nsd.pid the process id of the name server. /etc/nsd3/nsd.conf default NSD configuration file DIAGNOSTICS
will log all the problems via the standard syslog(8) daemon facility, unless the -d option is specified. SEE ALSO
nsdc(8), nsd.conf(5), nsd-checkconf(8), nsd-notify(8), nsd-patch(8), nsd-xfer(8), zonec(8) AUTHORS
NSD was written by NLnet Labs and RIPE NCC joint team. Please see CREDITS file in the distribution for further details. BUGS
NSD will answer the queries erroneously if the database was not properly compiled with zonec(8). Therefore problems with misconfigured mas- ter zone files or zonec(8) bugs may not be visible until the queries are actually answered with NSD. NLnet Labs jul 19, 2012 NSD(8)
All times are GMT -4. The time now is 08:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy