01-12-2006
I did give you a reply. You haven't said whether that was any help or not. Also, you are violating the
rules. In particular rule 4:
(4) Do not 'bump up' questions if they are not answered promptly. No duplicate or cross-posting and do not report a post where your goal is to get an answer more quickly.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am getting the coutput like this as show below in one single line, where as the command is executed is several lines and the output should also be requied in several lines, not in one single line.
Anyone any idea?
p4 opened -a | grep *locked* | awk '{ printf $8 }' >/tmp/aa
$ cat... (1 Reply)
Discussion started by: csaha
1 Replies
2. Shell Programming and Scripting
Hi I have used many times the various methods to append two lines together in a file.
This time I want to append the 1st line to the second and repeat for the complete file.... an example
This is the file
owns the big brown dog
joe
owns the small black dog
jim
What I want is
... (7 Replies)
Discussion started by: dwalley
7 Replies
3. Shell Programming and Scripting
i have a script that joins 2 lines of a file into one line and again next 2 line into one line.
if number of line is 4 then after joining it should be 2 lines in a file
my file a1.txt has some of the below lines
1-GH32X, CC, AMR,
Number of Intervals Not Inserted: 1 / 95
1-150KP1, CC,... (3 Replies)
Discussion started by: ali560045
3 Replies
4. Shell Programming and Scripting
It sounds a bit confusing but what I have is a text file like the example below (without the Line1, Line2, Line3 etc. of course) and I want to move every group of characters into a new line after each space.
Example of text file;
line1 .digg-widget-theme2 ul { background: rgb(0, 0, 0) none... (7 Replies)
Discussion started by: lewk
7 Replies
5. Shell Programming and Scripting
Dear All,
I want to split single line into two line or three lines wherever “|” separated values comes using
Input line
test,DEMTEMPUT20100404010012,,,,,,,,|0070086|0070087,
output shoule be
test,DEMTEMPUT20100404010012,,,,,,,,0070086,
test,DEMTEMPUT20100404010012,,,,,,,,0070087, (14 Replies)
Discussion started by: arvindng
14 Replies
6. Shell Programming and Scripting
I do have a file with contents splited into multiple lines
ADSLHLJASHGLJSKAGHJJGAJSLGAHLSGHSAKBV
AJHALHALHGLAGLHGBJVFBJVLFDHADAH
GFJAGJAGAJFGAKGAKGFAK
AJHFAGAKAGAGKAKAKGKAGFGJDGDJJDGJDJDFAG
...
...
....
100's of lines
I would like to rearrange the content of this file so it will be a... (1 Reply)
Discussion started by: Lucky Ali
1 Replies
7. Shell Programming and Scripting
Hi,
I have a requirement with,
No~Dt~Notes
1~2011/08/1~"aaa
bbb
ccc
ddd
eee
fff
ggg
hhh"
Single column alone got splitted into multiple lines.
I require the output as
No~Dt~Notes
1~2011/08/1~"aaa<>bbb<>ccc<>ddd<>eee<>fff<>ggg<>hhh"
mean to say those new lines to be... (1 Reply)
Discussion started by: Bhuvaneswari
1 Replies
8. Shell Programming and Scripting
Hi,
My Oracle query is returing below o/p
----------------------------------------------------------
Ins trnas value
a lkp1 x
a lkp1 y
b lkp1 a
b lkp2 x
b lkp2 y ... (7 Replies)
Discussion started by: gvk25
7 Replies
9. Shell Programming and Scripting
Hi,
I have a file like mentioned below..For each specific id starting with > I want to join the sequence in multiple lines to a single line..Is there a simple way in awk or sed to do this
>ENST00000558922 cdna:KNOWN
TCCAGGATCCAGCCTCCCGATCACCGCGCTAGTCCTCGCCCTGCCTGGGCTTCCCCAGAG... (2 Replies)
Discussion started by: Diya123
2 Replies
10. Shell Programming and Scripting
Hi,
I need some iteration to do the following work.
Sample:
ANS|26-Jan-2012|26|MON|12536.1
ANS|26-Jan-2012|26|TUE|2536.1
ANS|26-Jan-2012|26|THUR|789.1
SED|26-Jan-2013|32|MON|258.1
SED|26-Jan-2013|32|TUE|369.1
SED|26-Jan-2013|32|THUR|2145.1
OUTPUT:
... (3 Replies)
Discussion started by: anshaa
3 Replies
LEARN ABOUT DEBIAN
dbix::class::helper::resultset::searchor
DBIx::Class::Helper::ResultSet::SearchOr(3pm) User Contributed Perl Documentation DBIx::Class::Helper::ResultSet::SearchOr(3pm)
NAME
DBIx::Class::Helper::ResultSet::SearchOr - Combine ResultSet searches with OR's
VERSION
version 2.013002
SYNOPSIS
package MyApp::Schema::ResultSet::Tests;
use base 'DBIx::Class::ResultSet';
__PACKAGE__->load_components(qw(Helper::ResultSet::IgnoreWantarray Helper::ResultSet::SearchOr));
sub failed {
my $self = shift;
my $me = $self->current_source_alias;
$self->search({ "$me.passed" => '0' });
}
sub untested {
my $self = shift;
my $me = $self->current_source_alias;
$self->search({ "$me.passed" => undef });
}
sub not_passed {
my $self = shift;
my $me = $self->current_source_alias;
$self->search_or([$self->failed, $self->untested]);
}
1;
DESCRIPTION
I would argue that the most important feature of DBIx::Class is the fact that you can "chain" ResultSet searches. Unfortunately this can
cause problems when you need to reuse multiple ResultSet methods as... well as or's. In the past I got around this by doing:
$rs->foo->union([ $rs->bar]);
While this works, it can generate some hairy SQL pretty fast. This Helper is supposed to basically be a lightweight union. Note that it
therefor has a number of "LIMITATIONS". The thing that makes this module special is that the ResultSet that is doing the "search_or" ing
still limits everything correctly. To be clear, the following only returns $user's friends that match either of the following criteria:
my $friend_rs = $schema->resultset('Friend');
my @internet_friends = $user->friends->search_or([
$friend_rs->on_facebook,
$friend_rs->on_twitter,
])->all;
With a union, you'd have to implement it like this:
$user->friends->on_facebook->union([ $user->friends->on_twitter ]);
The union will work, but it will generate more complex SQL that may have lower performance on your database.
See "NOTE" in DBIx::Class::Helper::ResultSet for a nice way to apply it to your entire schema.
METHODS
search_or
my $new_rs = $rs->search_or([ $rs->foo, $rs->bar ]);
"search_or" takes a single arrayref of ResultSets. The ResultSets must point to the same source or you will get an error message.
Additionally, no check is made to ensure that more than one ResultSet is in the ArrayRef, but only passing one ResultSet would not make any
sense.
LIMITATIONS
Because this module us basically an expression union and not a true union, "JOIN"'s won't Just Work. If you have a ResultSet method that
uses a "JOIN" and you want to "OR" it with another method, you'll need to do something like this:
my @authors = $authors->search(undef, { join => 'books' })->search_or([
$authors->wrote_good_books,
$authors->wrote_bestselling_books,
])->all;
Furthermore, if you want to "OR" two methods that "JOIN" in the same relationship via alternate paths you must use union.
AUTHOR
Arthur Axel "fREW" Schmidt <frioux+cpan@gmail.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Arthur Axel "fREW" Schmidt.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.14.2 2012-06-18 DBIx::Class::Helper::ResultSet::SearchOr(3pm)