Sponsored Content
Full Discussion: divert output
Top Forums Shell Programming and Scripting divert output Post 11620 by kanang on Sunday 9th of December 2001 08:10:03 PM
Old 12-09-2001
divert output

i want to run a ksh script 'myscript' at the background and direct the system to return any error msg to /tmp/myscript.err and the output of 'myscript' to /tmp/myscript.out
how do i do that at the command prompt? thank you.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to make a line BLINKING in output and also how to increase font size in output

how to make a line BLINKING in output and also how to increase font size in output suppose in run a.sh script inside echo "hello world " i want that this should blink in the output and also the font size of hello world should be big .. could you please help me out in this (3 Replies)
Discussion started by: mail2sant
3 Replies

2. Shell Programming and Scripting

top output for six processes with the same name, output changed from column to row

Hi, I have a system under test, and I use a script that does a ps. The output, is in the following format, it's basically the timestamp, followed by the rss and vsize. 09:03:57 68404 183656 68312 181944 69860 217360 67536 182564 69072 183172 69032 199276 09:04:27 68752 183292 70000 189020... (5 Replies)
Discussion started by: Bloke
5 Replies

3. Shell Programming and Scripting

awk: round output or delimit output of arithmatic string

I have a file with the following content. > cat /tmp/internetusage.txt 6709.296322 30000 2/7/2010 0.00I am using the following awk command to calculate a percentage from field 1 and 2 from the file. awk '{ print $1/$2*100 }' /tmp/internetusage.txt This outputs the value "22.3643" as a... (1 Reply)
Discussion started by: jelloir
1 Replies

4. IP Networking

Divert DNS traffic to another gateway

hello all, i have a local bind9 dns server running on debian. its default gateway is 10.0.0.x. This internet gateway has limited bandwidth. we have another high speed internet connection(adsl) and the gateway to access this connection is 10.0.0.y. all users in the office are using... (2 Replies)
Discussion started by: coolatt
2 Replies

5. UNIX for Advanced & Expert Users

How to do an IP Divert From one ip to the other?

Hi Guys, This was been a Project kinda stuff i working out effectively from past 1 month.i would like to thank Unix forums for helping me out.So here is my Problem.i was been planning out in creating a Intelligent monitoring machine to make it available for multiple applications to get the log... (2 Replies)
Discussion started by: kgrvamsi
2 Replies

6. Shell Programming and Scripting

Awk script to run a sql and print the output to an output file

Hi All, I have around 900 Select Sql's which I would like to run in an awk script and print the output of those sql's in an txt file. Can you anyone pls let me know how do I do it and execute the awk script? Thanks. (4 Replies)
Discussion started by: adept
4 Replies

7. 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

8. Shell Programming and Scripting

Displaying log file pattern output in tabular form output

Hi All, I have result log file which looks like this (below): from the content need to consolidate the result and put it in tabular form 1). Intercomponents Checking Passed: All Server are passed. ====================================================================== 2). OS version Checking... (9 Replies)
Discussion started by: Optimus81
9 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
HTTP::Cache::Transparent(3pm)				User Contributed Perl Documentation			     HTTP::Cache::Transparent(3pm)

NAME
HTTP::Cache::Transparent - Cache the result of http get-requests persistently. SYNOPSIS
use LWP::Simple; use HTTP::Cache::Transparent; HTTP::Cache::Transparent::init( { BasePath => '/tmp/cache', } ); my $data = get( 'http://www.sn.no' ); DESCRIPTION
An implementation of http get that keeps a local cache of fetched pages to avoid fetching the same data from the server if it hasn't been updated. The cache is stored on disk and is thus persistent between invocations. Uses the http-headers If-Modified-Since and ETag to let the server decide if the version in the cache is up-to-date or not. The cache is implemented by modifying the LWP::UserAgent class to seamlessly cache the result of all requests that can be cached. INITIALIZING THE CACHE
HTTP::Cache::Transparent provides an init-method that sets the parameters for the cache and overloads a method in LWP::UserAgent to activate the cache.After init has been called, the normal LWP-methods (LWP::Simple as well as the more full-fledged LWP::Request methods) should be used as usual. init Initialize the HTTP cache. Takes a single parameter which is a hashref containing named arguments to the object. HTTP::Cache::Transparent::init( { # Directory to store the cache in. BasePath => "/tmp/cache", # How many hours should items be kept in the cache # after they were last requested? # Default is 8*24. MaxAge => 8*24, # Print progress-messages to STDERR. # Default is 0. Verbose => 1, # If a request is made for a url that has been requested # from the server less than NoUpdate seconds ago, the # response will be generated from the cache without # contacting the server. # Default is 0. NoUpdate => 15*60, # When a url has been downloaded and the response indicates that # has been modified compared to the content in the cache, # the ApproveContent callback is called with the HTTP::Response. # The callback shall return true if the response shall be used and # stored in the cache or false if the response shall be discarded # and the response in the cache used instead. # This mechanism can be used to work around servers that return errors # intermittently. The default is to accept all responses. ApproveContent => sub { return $_[0]->is_success }, } ); The directory where the cache is stored must be writable. It must also only contain files created by HTTP::Cache::Transparent. Initializing from use-line An alternative way of initializing HTTP::Cache::Transparent is to supply parameters in the use-line. This allows you to write use HTTP::Cache::Transparent ( BasePath => '/tmp/cache' ); which is exactly equivalent to use HTTP::Cache::Transparent; HTTP::Cache::Transparent::init( BasePath => '/tmp/cache' ); The advantage to using this method is that you can do perl -MHTTP::Cache::Transparent=BasePath,/tmp/cache myscript.pl or even set the environment variable PERL5OPT PERL5OPT=-MHTTP::Cache::Transparent=BasePath,/tmp/cache myscript.pl and have all the http-requests performed by myscript.pl go through the cache without changing myscript.pl INSPECTING CACHE BEHAVIOR
The HTTP::Cache::Transparent inserts two special headers in the HTTP::Response object. These can be accessed via the HTTP::Response::header()-method. X-Cached This header is inserted and set to 1 if the response is delivered from the cache instead of from the server. X-Content-Unchanged This header is inserted and set to 1 if the content returned is the same as the content returned the last time this url was fetched. This header is always inserted and set to 1 when the response is delivered from the cache. LIMITATIONS
This module has a number of limitations that you should be aware of before using it. - There is no upper limit to how much diskspace the cache requires. The only limiting mechanism is that data for urls that haven't been requested in the last MaxAge hours will be removed from the cache the next time the program exits. - Currently, only get-requests that store the result in memory (i.e. do not use the option to have the result stored directly in a file or delivered via a callback) is cached. I intend to remove this limitation in a future version. - The support for Ranges is a bit primitive. It creates a new object in the cache for each unique combination of url and range. This will work ok as long as you always request the same range(s) for a url. - The cache doesn't properly check and store all headers in the HTTP request and response. Therefore, if you request the same url repeatedly with different sets of headers (cookies, accept-encoding etc), and these headers affect the response from the server, the cache may return the wrong response. CACHE FORMAT
The cache is stored on disk as one file per cached object. The filename is equal to the md5sum of the url and the Range-header if it exists. The file contains a set of key/value-pairs with metadata (one entry per line) followed by a blank line and then the actual data returned by the server. The last modified date of the cache file is set to the time when the cache object was last requested by a user. AUTHOR
Mattias Holmlund, <$firstname -at- $lastname -dot- se> <http://www.holmlund.se/mattias/> GIT REPOSITORY
A git repository containing the source for this module can be found via http://git.holmlund.se/ COPYRIGHT AND LICENSE
Copyright (C) 2004-2007 by Mattias Holmlund This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or, at your option, any later version of Perl 5 you may have available. perl v5.12.4 2007-12-12 HTTP::Cache::Transparent(3pm)
All times are GMT -4. The time now is 04:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy