Hell friends,
I wrote a script gets the summation of particular column using awk.
The awk output is given in scientific notation. How do I convert the scientific notation to normal.
My awk syntax : awk '{sum += $2} END { printf sum }' temprep.txt
Out put is like 1.5365e+07
I want it as... (2 Replies)
Hi All,
I ve a to extract data from oracle database . I already wrote code for the same
----------------------------------------------------------------------------------------
/u01/oracle/10.2/db_tst/bin/sqlplus -s $LOGIN/$PASS@$DBCONN <<-END > ${DSTDIR}/${FLNAME}
set serveroutput on;... (7 Replies)
I have a file named "suspected" with series of line like these :
{'protocol': 17, 'service': 'BitTorrent KRPC', 'server': '219.78.120.166', 'client_port': 52044, 'client': '10.64.68.44', 'server_port': 8291, 'time': 1226506312L, 'serverhostname': ''}
{'protocol': 17, 'service': 'BitTorrent... (3 Replies)
Dear all-
I have a requirement to send an email via email with body content which looks something below-
Email body contents
--------------------
RequestType: Update
DateAcctOpened: 1/5/2010
Note that header information and data content should be normal text..
Please advice on... (5 Replies)
Dea all,
I have a question. I have a column of numbers with scientific notion and decimal combined data. I want to print it only if the number <0.05 using awk. however the very small numbers with scientific notion is not selected. Do any one know how to solve it? Thanks! example as below: ... (4 Replies)
Hi all,
I'm struggling :wall: to make a an if statement on two variables in scientific format.
e.g.
a=1.23e+01
b=3.21e+02
I know that it can be done with bc if the variable are not in scientific format.
But what to do in this case???
Thank you, (3 Replies)
Hi,
I have EBCDIC format file and i wold like to convert normal string(user readable) in unix .
The source having the binary IBM file format
Sample Source Format:
... (3 Replies)
Hi,
I am trying to show my list, from a simple list format to a table (row and column formatted table)
Currently i have this format in my output (the formart it will always be like this ) >> first 3 lines must be on the same line aligned, and the next 3 shud be on 2nd line....:
INT1:... (10 Replies)
Hi everyone,
I need to convert some numbers that are written in scientific notation to normal notation.
Here is a sample line from my data file;
"1",1,-1,0,0,502,0,0.00000000000E+00,0.00000000000E+00,0.35591163544E+03,0.35591163548E+03,0.50400001928E-02,0.,-1.
first of all, my data file... (4 Replies)
Dear all,
I have a txt file with only one column which contains p values. My data looks like this:
5.04726976606584e-190
2.94065711152402e-189
2.94065711152402e-189
9.19932135717279e-176
1.09472516659859e-170
1.24974648916809e-170
0.1223974648916
0.9874974648916
...
what I want... (2 Replies)
Discussion started by: forevertl
2 Replies
LEARN ABOUT DEBIAN
plack::middleware::accesslog
Plack::Middleware::AccessLog(3pm) User Contributed Perl Documentation Plack::Middleware::AccessLog(3pm)NAME
Plack::Middleware::AccessLog - Logs requests like Apache's log format
SYNOPSIS
# in app.psgi
use Plack::Builder;
builder {
enable "Plack::Middleware::AccessLog", format => "combined";
$app;
};
DESCRIPTION
Plack::Middleware::AccessLog forwards the request to the given app and logs request and response details to the logger callback. The format
can be specified using Apache-like format strings (or "combined" or "common" for the default formats). If none is specified "combined" is
used.
This middleware uses calculable content-length by checking body type, and can not log the time taken to serve requests. It also logs the
request before the response is actually sent to the client. Use Plack::Middleware::AccessLog::Timed if you want to log details after the
response is transmitted (more like a real web server) to the client.
This middleware is enabled by default when you run plackup as a default "development" environment.
CONFIGURATION
format
enable "Plack::Middleware::AccessLog",
format => '%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-agent}i"';
Takes a format string (or a preset template "combined" or "custom") to specify the log format. This middleware implements a subset of
Apache's LogFormat templates <http://httpd.apache.org/docs/2.0/mod/mod_log_config.html>:
%% a percent sign
%h REMOTE_ADDR from the PSGI environment, or -
%l remote logname not implemented (currently always -)
%u REMOTE_USER from the PSGI environment, or -
%t [local timestamp, in default format]
%r REQUEST_METHOD, REQUEST_URI and SERVER_PROTOCOL from the PSGI environment
%s the HTTP status code of the response
%b content length
%T custom field for handling times in subclasses
%D custom field for handling sub-second times in subclasses
%v SERVER_NAME from the PSGI environment, or -
%V HTTP_HOST or SERVER_NAME from the PSGI environment, or -
Some of these format fields are only supported by middleware that subclasses "AccessLog".
In addition, custom values can be referenced, using "%{name}", with one of the mandatory modifier flags "i", "o" or "t":
%{variable-name}i HTTP_VARIABLE_NAME value from the PSGI environment
%{header-name}o header-name header
%{time-format]t localtime in the specified strftime format
logger
my $logger = Log::Dispatch->new(...);
enable "Plack::Middleware::AccessLog",
logger => sub { $logger->log(level => 'debug', message => @_) };
Sets a callback to print log message to. It prints to "psgi.errors" output stream by default.
SEE ALSO
<http://httpd.apache.org/docs/2.2/mod/mod_log_config.html> Rack::CustomLogger
perl v5.14.2 2012-04-14 Plack::Middleware::AccessLog(3pm)