I have a script that produces an output containing '/.ssh'.
I am trying to find a way of parsing only this data from a single line, without removing any other special characters contained within the output as a result of the parse.
Any help would be appreciated (6 Replies)
Hi,
I have input file contains sql queries i need to eliminate newlines from it.
when i open it vi text editor and runs
:%s/'\n/'/g
it provides required result. but when i run sed command from shell prompt it doesn't impact outfile is still same as inputfile.
shell] sed -e... (6 Replies)
Hello
I've got a string of text with a number in pence, e.g. 0.52p, I need to remove the 'p' so that it just reads 0.52 without of course removing all the other 'p' characters.
Many thanks (1 Reply)
hi i am having delimited .dat file having content like below.
test.dat(5 line of records)
======
PT2~Stag~Pt2 Stag Test.
Updated~PT2 S T~Area~~UNCEF R20~~2012-05-24 ~2014-05-24~~
PT2~Stag y~Pt2 Stag Test.
Updated~PT2 S T~Area~METR~~~2012-05-24~2014-05-24~~test
PT2~Pt2 Stag Test~~PT2 S... (4 Replies)
Below am trying to separate FA-7A:1, In output file it should display 7A 1
Command am using
Gives same output as below format:
22B7 10000000c9720873 0
22B7 10000000c95d5d8b 0
22BB 10000000c97843a2 0
22BB 10000000c975adbd 0
Not showing FA ports as required format... (5 Replies)
Below i am trying to remove "/" and "r" from the output, so i need output as:
hdiskpower3
hdisk0
hdisk1
#inq | grep 5773 | awk '{print $1}' | sed 's/dev//g' | awk -F"/" '{$1=$1}1'
.....................................................//rhdiskpower0
//rhdiskpower1
//rhdiskpower2... (3 Replies)
Hi all..
I have a text file which looks like below:
abcd
efgh
ijkl
(blank space)
I need to remove only the last (blank space) from the file. When I try wc -l the file name,the number of lines coming is 3 only, however blank space is there in the file.
I have tried options like... (14 Replies)
Here is my task, I feel sure this can be accomplished with see/awk but can't seem to figure out how.
I have large flat file from which I need to extract every case of a pairing of characters (GG) in this case PLUS the previous 20 characters. The output should be a list (which I plan to make... (17 Replies)
Hi all,
I need to remove DBPATH= and /db from the string below using awk (or sed, as it also exists on the machine).
Input: DBPATH=/some/path/database/db
Desired output: /some/path/database
Thank you! (8 Replies)
I have a file which comes every day and the file data look's as below.
Vi abc.txt
a|b|c|d\n
a|g|h|j\n
Some times we receive the file with only a new line character in the file like
vi abc.txt
\n (8 Replies)
Discussion started by: rak Kundra
8 Replies
LEARN ABOUT DEBIAN
mojo::transaction::http
Mojo::Transaction::HTTP(3pm) User Contributed Perl Documentation Mojo::Transaction::HTTP(3pm)NAME
Mojo::Transaction::HTTP - HTTP 1.1 transaction container
SYNOPSIS
use Mojo::Transaction::HTTP;
my $tx = Mojo::Transaction::HTTP->new;
DESCRIPTION
Mojo::Transaction::HTTP is a container for HTTP 1.1 transactions as described in RFC 2616.
EVENTS
Mojo::Transaction::HTTP inherits all events from Mojo::Transaction and can emit the following new ones.
"request"
$tx->on(request => sub {
my $tx = shift;
...
});
Emitted when a request is ready and needs to be handled.
$tx->on(request => sub {
my $tx = shift;
$tx->res->headers->header('X-Bender', 'Bite my shiny metal ass!');
});
"upgrade"
$tx->on(upgrade => sub {
my ($tx, $ws) = @_;
...
});
Emitted when transaction gets upgraded to a Mojo::Transaction::WebSocket object.
$tx->on(upgrade => sub {
my ($tx, $ws) = @_;
$ws->res->headers->header('X-Bender', 'Bite my shiny metal ass!');
});
ATTRIBUTES
Mojo::Transaction::HTTP inherits all attributes from Mojo::Transaction.
METHODS
Mojo::Transaction::HTTP inherits all methods from Mojo::Transaction and implements the following new ones.
"client_read"
$tx->client_read($chunk);
Read and process client data.
"client_write"
my $chunk = $tx->client_write;
Write client data.
"keep_alive"
my $success = $tx->keep_alive;
Check if connection can be kept alive.
"server_leftovers"
my $leftovers = $tx->server_leftovers;
Leftovers from the server request, used for pipelining.
"server_read"
$tx->server_read($chunk);
Read and process server data.
"server_write"
my $chunk = $tx->server_write;
Write server data.
SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicio.us>.
perl v5.14.2 2012-09-05 Mojo::Transaction::HTTP(3pm)