I am attempting to itterate through a file that has multiple lines and for each one read the entire line and use the value then to search in other files. The problem is that instead of an entire line I am getting each word in the file set as the value I am searching for. For example in File 1... (2 Replies)
Hello,
I have a cat.dat file, i would like shell to read each 3 lines and set this 3 lines to 3 different variables.
my cat.dat is:
11
12
+380486461001
12
13
+380486461002
13
14
+380486461003
i want shell to make a loop and assign 1st line to student_id, 2nd line to... (4 Replies)
Hi all,
Am new to scripting. So i just need your ideas to help me out. Here goes my requirement.
I have two csv files
1.csv 2.csv
abc,1.24 abc,1
def,2.13 def,1
I need to compare the first column of 1.csv with 2.csv and if matches then need to compare... (2 Replies)
I have a csv file with the values seperated by commas.I want to extract these values one by one and assign to a variable using shell script.Any ideas or code? (11 Replies)
I need to read data from a file called "test.csv" through shell script where the file contains values like name,price,descriptor etc. There are rows where descriptor (& in some rows name) are written as string & other characters like "car_+" OR "bike*" etc where it should contains strings like... (3 Replies)
Enclosed is comma separated text file. I need to write a korn shell program that will parse the text file and insert the values into Oracle database.
I need to write the korn shell program on Red Hat Enterprise Linux server.
Oracle database is 10g. (15 Replies)
Hello All,
i am a newbie and need some help when reading a csv file in a bourne shell script. I want to read 10 lines, then wait for a minute and then do a reading of another 10 lines and so on in the same way. I want to do this till the end of file.
Any inputs are appreciated
... (3 Replies)
Hello,
I have a simple script that runs an application,
# these arguments have the same value for all splits
ARCH=12.11.1
BATCHES=50
EPOCHS=5000
LEARN_MODE=ONLINE
LEARN_RATE=0.25
PROJ=02_BT_12.11.1.proj
echo "processing split A on hex"
cd A/
DATA_SET=S2A_v1_12.1.1_1... (4 Replies)
hi all i have a reporting work and i want it to be automated using shell scripting kindly let me know how can i make that possibe .
eg data are :... (2 Replies)
I have input data looks like this which is a part of a csv file
7,1265,76548,"0102:04"
8,1266,76545,"0112:04"
I need to make the output data should look like this and the output data will be part of text file:
7|1265000 |7654899 |A|
8|12660000 |76545999 |B|
The logic behind the... (6 Replies)
Discussion started by: RJG
6 Replies
LEARN ABOUT DEBIAN
plack::middleware::httpexceptions
Plack::Middleware::HTTPExceptions(3pm) User Contributed Perl Documentation Plack::Middleware::HTTPExceptions(3pm)NAME
Plack::Middleware::HTTPExceptions - Catch HTTP exceptions
SYNOPSIS
use HTTP::Exception;
my $app = sub {
# ...
HTTP::Exception::500->throw;
};
builder {
enable "HTTPExceptions", rethrow => 1;
$app;
};
DESCRIPTION
Plack::Middleware::HTTPExceptions is a PSGI middleware component to catch exceptions from applications that can be translated into HTTP
status codes.
Your application is supposed to throw an object that implements a "code" method which returns the HTTP status code, such as 501 or 404.
This middleware catches them and creates a valid response out of the code. If the "code" method returns a code that is not an HTTP redirect
or error code (3xx, 4xx, or 5xx), the exception will be rethrown.
The exception object may also implement "as_string" or overload stringification to represent the text of the error. The text defaults to
the status message of the error code, such as Service Unavailable for 503.
Finally, the exception object may implement "as_psgi", and the result of this will be returned directly as the PSGI response.
If the code is in the 3xx range and the exception implements the 'location' method (HTTP::Exception::3xx does), the Location header will be
set in the response, so you can do redirects this way.
There are CPAN modules HTTP::Exception and HTTP::Throwable, and they are perfect to throw from your application to let this middleware
catch and display, but you can also implement your own exception class to throw.
If the thrown exception is not an object that implements either a "code" or an "as_psgi" method, a 500 error will be returned.
Alternatively, you can pass a true value for the "rethrow" parameter for this middleware, and the exception will instead be rethrown. This
is enabled by default when "PLACK_ENV" is set to "development", so that the StackTrace middleware can catch it instead.
AUTHOR
Tatsuhiko Miyagawa
SEE ALSO
paste.httpexceptions HTTP::Exception HTTP::Throwable
perl v5.14.2 2011-06-22 Plack::Middleware::HTTPExceptions(3pm)