The stream has a tough time distinguishing whitespace from tab chars, so you might want to swap them into visible chars going in, and return them to normal coming out:
This seds the tab chars into an alternate delimiter and then cuts the fields according to your needs. The entire thing is then reversed on its way out, so that it can be redirected to a second file, etc.
Hi there !
I have file with single column. I want to cut that column at fixed number of rows each time and paste in another file, in a way that in new file, the each cutting appear as separate columns.
I mean cutting file with one column of 10000 rows, with 100 rows each time, and in new file... (3 Replies)
I know this should be simple, but I've been manning sed awk grep and find and am stupidly stumped :(
I'm trying to use sed (or awk, find, etc) to find 4 characters on the second line of a file.txt 44-47 characters in. I can find lots of sed things for lines, but not characters. (4 Replies)
First I have to say thank you to this community and this forum. You helped me very much builing several useful scripts.
Now, I can't get a solution the following problem, I'm stuck somehow. Maybe someone has an idea.
In short, I dump a site via lynx and pipe the output in a file. I need to... (7 Replies)
Hi friends,
My file is like:
Second file is :
I need to print the rows present in file one, but in order present in second file....I used
while read gh;do
awk ' $1=="' $gh'" {print >> FILENAME"output"} ' cat listoffirstfile
done < secondfile
but the output I am... (14 Replies)
I have a file laid out in columns with the first two lines line being:
219 432 4567
219 432 4587
I need to create a single line command to cut the characters in the 5th column and paste them back to the first column in the same file. (Hint:Two good solutions exist, one in which you use a... (9 Replies)
Hi
I have 5 columns like this
a b c d e
f g h i j
k l m n o
From 2nd column till the 5th column of every record, I would like to transpose them as rows, so my output file contains only one row
a
b
c
d
e
f
g
h
i
j (9 Replies)
Hi All,
I having a data file which consists of 20cr records in it. The 1st column is year field which consist of year in format 200809 and fields are seperated with ^.
How do i trim it to 2008 in file and save it in a quick time as there are many records so that i can use the file for loading... (3 Replies)
Hello Gurus,
This is my first ever post here. I tried looking for similar material but came up empty handed. Apologies if this is too verbose or if I'm not using the correct formatting.
I have files containing a fixed number of elements per line; separator is a single space. Each line has the... (4 Replies)
Hi Team,
I have a file a1.txt with data as follows.
dfjakjf...asdfkasj</EnableQuotedIDs><SQL><SelectStatement modified='1' type='string'><!
The delimiter string: <SelectStatement modified='1' type='string'><!
dlm="<SelectStatement modified='1' type='string'><!
The above command is... (7 Replies)
Discussion started by: kmanivan82
7 Replies
LEARN ABOUT DEBIAN
dbix::class::schema::loader::relbuilder
DBIx::Class::Schema::Loader::RelBuilder(3pm) User Contributed Perl Documentation DBIx::Class::Schema::Loader::RelBuilder(3pm)NAME
DBIx::Class::Schema::Loader::RelBuilder - Builds relationships for DBIx::Class::Schema::Loader
SYNOPSIS
See DBIx::Class::Schema::Loader and DBIx::Class::Schema::Loader::Base.
DESCRIPTION
This class builds relationships for DBIx::Class::Schema::Loader. This is module is not (yet) for external use.
METHODS
new
Arguments: $loader object
generate_code
Arguments:
[
[ local_moniker1 (scalar), fk_info1 (arrayref), uniq_info1 (arrayref) ]
[ local_moniker2 (scalar), fk_info2 (arrayref), uniq_info2 (arrayref) ]
...
]
This generates the code for the relationships of each table.
"local_moniker" is the moniker name of the table which had the REFERENCES statements. The fk_info arrayref's contents should take the
form:
[
{
local_table => 'some_table',
local_moniker => 'SomeTable',
local_columns => [ 'col2', 'col3' ],
remote_table => 'another_table_moniker',
remote_moniker => 'AnotherTableMoniker',
remote_columns => [ 'col5', 'col7' ],
},
{
local_table => 'some_other_table',
local_moniker => 'SomeOtherTable',
local_columns => [ 'col1', 'col4' ],
remote_table => 'yet_another_table_moniker',
remote_moniker => 'YetAnotherTableMoniker',
remote_columns => [ 'col1', 'col2' ],
},
# ...
],
The uniq_info arrayref's contents should take the form:
[
[
uniq_constraint_name => [ 'col1', 'col2' ],
],
[
another_uniq_constraint_name => [ 'col1', 'col2' ],
],
],
This method will return the generated relationships as a hashref keyed on the class names. The values are arrayrefs of hashes containing
method name and arguments, like so:
{
'Some::Source::Class' => [
{ method => 'belongs_to', arguments => [ 'col1', 'Another::Source::Class' ],
{ method => 'has_many', arguments => [ 'anothers', 'Yet::Another::Source::Class', 'col15' ],
],
'Another::Source::Class' => [
# ...
],
# ...
}
AUTHOR
See "AUTHOR" in DBIx::Class::Schema::Loader and "CONTRIBUTORS" in DBIx::Class::Schema::Loader.
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 2012-06-08 DBIx::Class::Schema::Loader::RelBuilder(3pm)