Search Results

Search: Posts Made By: sargotrons
1,582
Posted By gandolf989
You may want to write a Perl wrapper with the...
You may want to write a Perl wrapper with the YAML library. Perl and YAML are really good at reading configuration files. You would then have a configuration file with all of the parameters that you...
1,582
Posted By rbatte1
If all the commands to run are based with the 1...
If all the commands to run are based with the 1 and 2 effectively being literal, could you do this:-find . -type f | while read path_file # Or however you generate your file list
do
...
6,510
Posted By Akshay Hegde
@SriniShoo : One array is enough I think Try...
@SriniShoo : One array is enough I think

Try

akshay@nio:/tmp$ cat infile
K00001 1 1 4 3 5
K00001 2 4 4 3 3
K00001 8 9 1 5 2
K00006 7 2 3 2 8
K00006 3 4 6 6 3
K00006 5 1 9 7 7
K00008 1 1...
6,510
Posted By SriniShoo
awk '{a[$1] += $2; b[$1] += $3; c[$1] += $4;...
awk '{a[$1] += $2; b[$1] += $3; c[$1] += $4; d[$1] += $5; e[$1] += $6} END {for(x in a) print x, a[x], b[x], c[x], d[x], e[x]}' file

---------- Post updated at 09:50 AM ---------- Previous update...
2,116
Posted By Skrynesaver
This would be my approach to accepting a random...
This would be my approach to accepting a random number of files as arguments


#!/usr/bin/perl

use strict;
use warnings;
my @aoh; # array of hashes
for my $file (@ARGV){
push...
2,116
Posted By Skrynesaver
This snippet does the job well, (though there may...
This snippet does the job well, (though there may already be a function in the bio-perl modules that addresses the wider issue you are solving, always worth having a look through CPAN before coding...
2,224
Posted By CarloM
You can supply an address (e.g. a line number) in...
You can supply an address (e.g. a line number) in sed commands to restrict the lines it changes.

For example, sed '2 s,^T,,g' would only operate on line 2, sed '2~4 s,^T,,g ' is line 2 and every...
2,224
Posted By jayan_jay
$ sed 's,^T,,g' infile
$ sed 's,^T,,g' infile
Showing results 1 to 8 of 8

 
All times are GMT -4. The time now is 12:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy