Results for "Number"

Wire posts

  • To round a floating-point value to a certain number of decimal places: $rounded = sprintf("%.2f", $unrounded); #Tipsoftheday #Perl

    3913 days ago

  • Number all lines in a file; perl -pe '$_ = "$. $_"': #Tipsoftheday #Perl

    3904 days ago

  • To count the number of matches in a string !!! $str = "one.two.three.four"; $n =()= $str =~ /\./gi; print $n; #Tipsoftheday #Perl

    3882 days ago

  • Count the total number of lines in a file. my $total=@{[<INFILE>]}; #Perl #Count #Number #Total #File

    3619 days ago

  • Count the number of occurrence of pattern in a file using Perl. perl -e '$_ = <>; print scalar ( () = m/needle/g ), "\n"' #Perl #Perloneliner #Count #Occurrence

    3618 days ago

  • Count the number of "pattern" occurrence in a file grep -o 'pattern' anc.annots.gff | wc -l #Linux #grep #Count #Number #Occurrence

    3618 days ago

  • To count number of fasta entries, I use: grep -c '^>' mySequences.fasta #Perl #Count #Number #Fasta #Linux #Grep

    3578 days ago

  • Sequential number arrays @arrayVal = (1 .. 10); #Perl #Array #Sequential

    3517 days ago

  • Get line number with Perl $fh->input_line_number() #Perl #Tipsoftheday #Tricks

    3372 days ago

  • Count the number of sequences in fastaq file. grep -c '^@' sample1.fq #Fastaq #Count #Number #Grep #Dirty #Oneliner #NGS

    3163 days ago