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
DNSPROXY(1)						    BSD General Commands Manual 					       DNSPROXY(1)

NAME
dnsproxy -- DNS proxy SYNOPSIS
dnsproxy [-dhV] [-c file] DESCRIPTION
The dnsproxy daemon waits for nameserver queries on a user specified address, dispatches these queries to authoritative and recursive name- servers and forwards the received answers back to the original client. The options are as follows: -c file Read configuration from file. -d Detach from current terminal and run as background process. -h Show usage. -V Show version. If a client from an internal IP address does a recursive lookup the query is forwarded to a recursive DNS server. Authoritative queries and queries coming from clients in foreign networks are forwarded to an authoritative DNS server. CONFIGURATION FILE
At startup dnsproxy reads a configuration file specified via the -c option or at the default location of /etc/dnsproxy.conf. The following keywords are recognized: authoritative IP Address of the authoritative nameserver [required]. recursive IP Address of the recursive nameserver [required]. listen IP Local address (defaults to 0.0.0.0). port number Local port number (defaults to 53). chroot path A path to chroot to before starting to answer queries. user name A user to change to before starting to answer queries. authoritative-timeout seconds Time in seconds when authoritative queries time out (defaults to 10). recursive-timeout seconds Time in seconds when recursive queries time out (defaults to 90). authoritative-port number Port number on authoritative nameserver (defaults to 53). recursive-port number Port number on recursive nameserver (defaults to 53). statistics seconds Period between output of statistics (defaults to 3600). Use 0 to disable output of statistics completely. internal network Declare networks recognized as internal and thus eligible to do recursive queries. One network in CIDR notation per keyword. EXAMPLE authoritative 10.1.1.1 recursive 127.0.0.1 recursive-port 10053 listen 192.168.1.1 port 53 chroot /var/empty user nobody internal 192.168.1.0/24 internal 127.0.0.1 STATISTICS
Every hour (by default) dnsproxy logs the collected statistics about its usage to standard error (or syslog when running detached). Statis- tics look like ActiveQr AuthorQr RecursQr AllQuery Answered 0 0 0 0 0 TimeoutQ DroppedQ DroppedA LateAnsw HashColl 0 0 0 0 0 and have the following meaning: ActiveQr Number of currently active queries proxied to the servers. AuthorQr Accumulated number of authoritative queries. RecursQr Accumulated number of recursive queries. AllQuery Accumulated number of all queries ever received. Answered Accumulated number of answered queries. TimeoutQ Accumulated number of queries that did not receive an answer in time. DroppedQ Accumulated number of dropped queries (e.g. transmission errors). DroppedA Accumulated number of dropped answers. LateAnsw Accumulated number of answers received after the timeout period. HashColl Accumulated number of hash collisions in the query list. SEE ALSO
named(1) VERSION
This manual page describes dnsproxy version 1.16. AUTHORS
Armin Wolfermann <armin@wolfermann.org> The dnsproxy homepage is at http://www.wolfermann.org/dnsproxy.html. LOCAL
November 29, 2003 LOCAL
All times are GMT -4. The time now is 02:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy