08-22-2011
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I wrote below small script which will add up each row value from a file and print the total, but it is not.plz let me know what is wrong.script hangs and not displaying anything.
-----------------
while read line ; do
sum=0;
sum=$sum+$line;
done
echo $sum;
exit 0;
------------------... (8 Replies)
Discussion started by: pradeep_script
8 Replies
2. Shell Programming and Scripting
Hi,
I need help on doing the below thing in shell script.
I have a file with millions of rows called "abc.txt". i have another file with millions of rows called "xyz.txt".
I would like to do the below operation.
Open the abc.txt, read the first line, do some operations on the column... (2 Replies)
Discussion started by: informsrini
2 Replies
3. Shell Programming and Scripting
Hello,
I want to make a script to do this :
the file is with line :
TOTO TEST1
TOTO TEST2
TITI TEST1
TITI TEST2
TITI TEST3
i want he become :
TOTO TEST1 TEST2
TITI TEST1 TEST2 TEST3 (3 Replies)
Discussion started by: safsound
3 Replies
4. Shell Programming and Scripting
Hi, I want to move a new row to another table if the field from new row doesn't have the first word that I categorized (like: IRC blablabla, PTM blablabla, ADM blablabla, BS blablabla).
I already use this script but doesn't work as I expected.
CHECK_KEYWORD="$( mysql -uroot -p123456 smsd -N... (7 Replies)
Discussion started by: jazzyzha
7 Replies
5. Shell Programming and Scripting
Hi, I already succeed moving a new row to another table if the field from new row doesn't have the first word that I categorized (like: IRC blablabla, PTM blablabla, ADM blablabla, BS blablabla).
But it can't delete the old row. Please help me with the script.
my php script:
INSERT INTO... (2 Replies)
Discussion started by: jazzyzha
2 Replies
6. Shell Programming and Scripting
Hello,
I need some help to reformat this table-by-row to matrix?
infile:
site1 A:o,p,q,r,s,t
site1 C:y,u
site1 T:v,w
site1 -:x,z
site2 A:p,r,t,v,w,z
site2 C:u,y
site2 G:q,s
site2 -:o,x
site3 A:o,q,s,t,u,z
site3 C:y
site3 T:v,w,x
site3 -:p,routfile:
SITE o p q r s t v u w x y... (7 Replies)
Discussion started by: yifangt
7 Replies
7. Shell Programming and Scripting
HI Guys,
I have Below Input :-
RepigA_hteis522 ReptCfiEtrBsCll_aofe
MSL04_MSL2_A25_1A 0 9
MSL04_MSL2_A25_1B 0 9
MSL04_MSL2_A25_1C 0 9
RepigA ReptCfiEtrBsCll
hteis522 aofe
MSL04_MSL2_A25_1A 0 9
MSL04_MSL2_A25_1B 0 9
MSL04_MSL2_A25_1C 0 9
Split Data in two first row... (2 Replies)
Discussion started by: pareshkp
2 Replies
8. UNIX for Beginners Questions & Answers
My original files are like this below and I distinguish them from the AP_ID (file1 has 572 and file2 has 544). Also, the header on file1 has “G_” pre-pended. NOTE: these are only snippets of very large files and much of the data is not present here.
Original File 1:
... (36 Replies)
Discussion started by: aachave1
36 Replies
9. Shell Programming and Scripting
Hi ALL,
We have requirement in a file, i have multiple rows.
Example below:
Input file rows
01,1,102319,0,0,70,26,U,1,331,000000113200000011920000001212
01,1,102319,0,1,80,20,U,1,241,00000059420000006021
I need my output file should be as mentioned below. Last field should split for... (4 Replies)
Discussion started by: kotra
4 Replies
10. UNIX for Beginners Questions & Answers
This is a question that is related to one I had last August when I was trying to sort/merge two files by millsecond time column (in this case column 6).
The script (below) that helped me last august by RudiC solved the puzzle of sorting/merging two files by time, except it gets lost when the... (0 Replies)
Discussion started by: aachave1
0 Replies
LEARN ABOUT DEBIAN
alzabo::runtime::joincursor
Alzabo::Runtime::JoinCursor(3pm) User Contributed Perl Documentation Alzabo::Runtime::JoinCursor(3pm)
NAME
Alzabo::Runtime::JoinCursor - Cursor that returns arrays of "Alzabo::Runtime::Row" objects
SYNOPSIS
use Alzabo::Runtime::JoinCursor;
my $cursor = $schema->join( tables => [ $foo, $bar ],
where => [ $foo->column('foo_id'), '=', 1 ] );
while ( my @rows = $cursor->next )
{
print $rows[0]->select('foo'), "
";
print $rows[1]->select('bar'), "
";
}
DESCRIPTION
Objects in this class are used to return arrays of Alzabo::Runtime::Row objects when requested. The cursor does not preload objects but
rather creates them on demand, which is much more efficient. For more details on the rational please see the RATIONALE FOR CURSORS section
in Alzabo::Design.
INHERITS FROM
"Alzabo::Runtime::Cursor"
METHODS
next
Returns the next array of "Alzabo::Runtime::Row" objects or an empty list if no more are available.
If an individual row could not be fetched, then the array may contain some "undef" values. For outer joins, this is normal behavior, but
for regular joins, this probably indicates a data error.
all_rows
This method fetches all the rows available from the current point onwards. This means that if there are five set of rows that will be
returned when the object is created and you call "next()" twice, calling "all_rows()" after it will only return three sets.
The return value is an array of array references. Each of these references represents a single set of rows as they would be returned from
the "next" method.
reset
Resets the cursor so that the next "next()" call will return the first row of the set.
count
Returns the number of rowsets returned by the cursor so far.
next_as_hash
Returns the next rows in a hash, where the hash keys are the table names and the hash values are the row object. If a table has been
included in the join via an outer join, then it is only included in the hash if there is a row for that table.
AUTHOR
Dave Rolsky, <autarch@urth.org>
perl v5.8.8 2007-12-23 Alzabo::Runtime::JoinCursor(3pm)