i get text files with
Based on the last column value of the row, i have to insert number of pipes after the 2nd column.
i know the way how to create if it is 3, 4, etc.. like.
My problem is i can't hard code like $NF==3, $NF==4 for each value as we don't know the value that is coming in the file.
Is there a way to do it for any value in the last column?
Thanks in advance.
Last edited by Scott; 01-27-2010 at 07:01 PM..
Reason: Code tags, please...
# this works
# creates two.txt
(echo one;echo two;echo three;) | (
( grep two > two.txt )
)
# wamt this to create two files:
# two.txt containing "two" and three.txt containing "three"
# Both files get created, but three.txt is empty
# is there a way to do this?
(echo one;echo two;echo... (3 Replies)
Hi All,
I have a file which looks like this:
234422 1 .00222
323232 1 3232
32323 1 0.00222
1234 2 1211
2332 2 0.9
233 3 0.883
123 3 45
As you can see, the second column of the file is already sorted which I did using sort command.
Now, I want to create files based on the second... (1 Reply)
Hi All,
I have following html code
<TR><TD>9</TD><TD>AR_TVR_TBS </TD><TD>85000</TD><TD>39938</TD><TD>54212</TD><TD>46</TD></TR>
<TR><TD>10</TD><TD>ASCV_SMY_TBS </TD><TD>69880</TD><TD>33316</TD><TD>45698</TD><TD>47</TD></TR>
<TR><TD>11</TD><TD>ARC_TBS ... (9 Replies)
Hi,
I need an awk script (or whatever shell-construct) that would take data like below and get the max value of 3 column, when grouping by the 1st column.
clientname,day-of-month,max-users
-----------------------------------
client1,20120610,5
client2,20120610,2
client3,20120610,7... (3 Replies)
Hi,
I have a similar input format-
A_1 2
B_0 4
A_1 1
B_2 5
A_4 1
and looking to print in this output format with headers. can you suggest in awk?awk because i am doing some pattern matching from parent file to print column 1 of my input using awk already.Thanks!
letter number_of_letters... (5 Replies)
Hello,
Using bash script, i need to process the following file:
887,86,,2013-11-06,1,10030,5,2,0,200,,
887,86,,2013-11-05,1,10030,5,2,0,199,,
887,138,,2013-11-06,1,10031,6,2,0,1610612736,,
887,164,,2013-11-06,1,10000,0,2,0,36000,,
and to create a new file such as the below
... (2 Replies)
Hi,
I have a table to be imported for R as matrix or data.frame but I first need to edit it because I've got several lines with the same identifier (1st column), so I want to sum the each column (2nd -nth) of each identifier (1st column)
The input is for example, after sorted:
K00001 1 1 4 3... (8 Replies)
Hello everyone,
I am using ksh on Solaris 10 and I'm gathering data in a CSV file that looks like this:
20170628-23:25:01,1,0,0,1,1,1,1,55,55,1
20170628-23:30:01,1,0,0,1,1,1,1,56,56,1
20170628-23:35:00,1,0,0,1,1,2,1,57,57,2
20170628-23:40:00,1,0,0,1,1,1,1,58,58,2... (6 Replies)
Hi All ,
I am having an input file as stated below
Input file
6 ddk/djhdj/djhdj/Q 10 0.5
dhd/jdjd.djd.nd/QB 01 0.5
hdhd/jd/jd/jdj/Q 10 0.5
512 hd/hdh/gdh/Q 01 0.5
jdjd/jd/ud/j/QB 10 0.5
HD/jsj/djd/Q 01 0.5
71 hdh/jjd/dj/jd/Q 10 0.5
... (5 Replies)
Discussion started by: kshitij
5 Replies
LEARN ABOUT DEBIAN
catalyst::action::renderview
Catalyst::Action::RenderView(3pm) User Contributed Perl Documentation Catalyst::Action::RenderView(3pm)NAME
Catalyst::Action::RenderView - Sensible default end action.
SYNOPSIS
sub end : ActionClass('RenderView') {}
DESCRIPTION
This action implements a sensible default end action, which will forward to the first available view, unless "$c->res->status" is a 3xx
code (redirection, not modified, etc.), 204 (no content), or "$c->res->body" has already been set. It also allows you to pass "dump_info=1"
to the url in order to force a debug screen, while in debug mode.
If you have more than one view, you can specify which one to use with the "default_view" config setting and the "current_view" and
"current_view_instance" stash keys (see Catalyst's "$c->view($name)" method -- this module simply calls "$c->view" with no argument).
METHODS
end
The default "end" action. You can override this as required in your application class; normal inheritance applies.
INTERNAL METHODS
execute
Dispatches control to superclasses, then forwards to the default View.
See "METHODS/action" in Catalyst::Action.
SCRUBBING OUTPUT
When you force debug with dump_info=1, RenderView is capable of removing classes from the objects in your stash. By default it will replace
any DBIx::Class resultsource objects with the class name, which cleans up the debug output considerably, but you can change what gets
scrubbed by setting a list of classes in $c->config->{'Action::RenderView'}->{ignore_classes}. For instance:
$c->config->{'Action::RenderView'}->{ignore_classes} = [];
To disable the functionality. You can also set config->{'Action::RenderView'}->{scrubber_func} to change what it does with the classes. For
instance, this will undef it instead of putting in the class name:
$c->config->{'Action::RenderView'}->{scrubber_func} = sub { undef $_ };
Deprecation notice
This plugin used to be configured by setting "$c->config->{debug}". That configuration key is still supported in this release, but is
deprecated, please use the 'Action::RenderView' namespace as shown above for configuration in new code.
EXTENDING
To add something to an "end" action that is called before rendering, simply place it in the "end" method:
sub end : ActionClass('RenderView') {
my ( $self, $c ) = @_;
# do stuff here; the RenderView action is called afterwards
}
To add things to an "end" action that are called after rendering, you can set it up like this:
sub render : ActionClass('RenderView') { }
sub end : Private {
my ( $self, $c ) = @_;
$c->forward('render');
# do stuff here
}
AUTHORS
Marcus Ramberg <marcus@thefeed.no>
Florian Ragwitz <rafl@debian.org>
COPYRIGHT
Copyright (c) 2006 - 2009 the Catalyst::Action::RenderView "AUTHOR" as listed above.
LICENSE
This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2011-01-05 Catalyst::Action::RenderView(3pm)