I have written a menu driven script to walk users through bringing up and down an application process.
Sometimes the user tells me the script does not work taking the application down, but he can't recall seeing an error message.
Is there a way to capture std out and stderr out from an... (6 Replies)
I have a simple script that uses scp to copy some files from one server to another. I want to capture the files that are copied but simple redirection to a file does not work.
So I want to capture this output from the scp command in a log file.
-bash-3.00$ scp -pr /export/jumpstart/Files... (7 Replies)
Hi All :
I wanted a unix command by which I could be able to print the output to a file and at the same time to a printer. Any help will be greatly appreciated.
Regards,
Ramamurthy Dasari (1 Reply)
Hi,
I am running a shell script called dbProcess.sh which performs shutdown and startup of various Oracle instances we have.At the time of execution the script produces the following output to the command line window
$./dbProcess.sh stop
#### Run Details ######
Hostname : server-hop-1... (4 Replies)
&& echo "PLEASE enter the command to capture output" || echo "Processing your command manual"
x=$#
echo $x
while
do
while man $@ | read -r line
do
>$@.txt
... (1 Reply)
Hi Everyone :),
Need your advice as I'm new to UNIX scripting.. I'm trying to write a script to capture snoop output for 5 minutes for every hour for 24 hours. To stop snoop, I need to press Control-C to break it. This is what I got so far, but now I'm stuck! :confused:
The script:
# cat... (2 Replies)
Hi
I have a script that will run multiple unix & sql commands. I want to see the output as well as capture it to a log file for further analysis. Is there an easy way to do that instead of adding "tee -a logfile" on everyline or even on the execute line (i.e. script | tee -s logfile).
Thanks (1 Reply)
I want to capture the debug for the below command in output file .
i tried like this but its not working:
sh -xv <scriptname> >> output.log
i want the output in a log file.
Anyone plz help in this (2 Replies)
Hi
I am new to Expect scripting. I have to connect to a remote server and capture the output. Here I need output of " send "list registered\r"" to be stored in a file. but after execution, /tmp/capture.txt is of 0 byte
#!/usr/bin/expect
spawn ssh abc@10.10.10.10 -p 5022
expect... (2 Replies)
Hi,
I'm trying to filter the following output to only display information about an alarm where the Status: corresponds to Set.
--------------------------------------------------------
Description: hw_optics: RX POWER LANE-0 LOW ALARM
Location: Optics0/0/0/21... (6 Replies)
Discussion started by: sand1234
6 Replies
LEARN ABOUT MOJAVE
apache2::util
install::TempContent::Objects::mod_perl-2.0.9::docs::apiUseraContributedinstall::TempContent::Objects::mod_perl-2.0.9::docs::api::Apache2::Util(3)NAME
Apache2::Util - Perl API for Misc Apache Utility functions
Synopsis
use Apache2::Util ();
# OS escape path
$escaped_path = Apache2::Util::escape_path($path, "a 'long' file.html");
# format time as a string
my $fmt = "%a, %D %H:%M:%S %Z";
$fmtdate = Apache2::Util::ht_time($r->pool, $r->request_time, $fmt, 0);
Description
Various Apache utilities that don't fit into any other group.
Functions API
"Apache2::Util" provides the following functions and/or methods:
"escape_path"
convert an OS path to a URL in an OS dependant way.
$escaped_path = Apache2::Util::escape_path($path, $p);
$escaped_path = Apache2::Util::escape_path($path, $p, $partial);
arg1: $path ( string )
The path to convert
arg2: $p ( "APR::Pool" )
The pool to allocate from
opt arg3: $partial ( boolean )
if TRUE, assume that the path will be appended to something with a '/' in it (and thus does not prefix "./")
if FALSE it prepends "./" unless $path contains ":" optionally followed by "/".
the default is TRUE
ret: $escaped_path ( string )
The escaped path
since: 2.0.00
"ht_time"
Convert time from an integer value into a string in a specified format
$time_str = Apache2::Util::ht_time($p);
$time_str = Apache2::Util::ht_time($p, $time);
$time_str = Apache2::Util::ht_time($p, $time, $fmt);
$time_str = Apache2::Util::ht_time($p, $time, $fmt, $gmt);
arg1: $p ( "APR::Pool object" )
The pool to allocate memory from
opt arg2: $time ( number )
The time to convert (e.g., "time()" or "$r->request_time").
If the value is not passed the current time will be used.
opt arg3: $fmt ( string )
The format to use for the conversion, using strftime(3) tokens.
If the value is not passed the default format used is:
"%a, %d %b %Y %H:%M:%S %Z"
opt arg4: $gmt ( boolean )
The time will be not converted to GMT if FALSE is passed.
If the value is not passed TRUE (do convert) is used as a default.
ret: $time_str (string)
The string that represents the specified time
since: 2.0.00
Examples:
Use current time, the default format and convert to GMT:
$fmtdate = Apache2::Util::ht_time($r->pool);
Use my time, the default format and convert to GMT:
my $time = time+100;
$fmtdate = Apache2::Util::ht_time($r->pool, $time);
Use the time the request has started, custom format and don't convert to GMT:
my $fmt = "%a, %D %H:%M:%S %Z";
$fmtdate = Apache2::Util::ht_time($r->pool, $r->request_time, $fmt, 0);
See Also
mod_perl 2.0 documentation.
Copyright
mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0.
Authors
The mod_perl development team and numerous contributors.
perl v5.18.22015install::TempContent::Objects::mod_perl-2.0.9::docs::api::Apache2::Util(3)