Results for "grep"

Wire posts

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

    3614 days ago

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

    3574 days ago

  • replace a word in all files in a directory: grep -lr --exclude-dir=".git" -e "oldword" . | xargs sed -i "s/oldword/newword/g" #Replace #Word #Linux

    3530 days ago

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

    3159 days ago

  • #Print all line #except those #contains a letter "T" that is not immediately followed by a "H" with: grep -v 'T[^H]'

    2961 days ago

  • Grep all the processor in Linux system $ grep "^processor" /proc/cpuinfo | tail -n 1 | awk '{print $3}' #Grep #OS #Linux #Processor

    2879 days ago

  • Extract fasta sequence by Ids: perl -ne 'if(/^>(\S+)/){$c=grep{/^$1$/}qw(id1 id2)}print if $c' fasta.file #Perl #PerlOneliner #PerlTrick #Extract #Ids #Fasta

    2786 days ago

  • List all kernels dpkg --get-selections | grep "linux-image-[[:digit:]].*" | tr "\t" ";" | cut -d ";" -f1 #Kernels #Linux #List

    2747 days ago

  • Extract ten lines below matched string with grep: grep -A 10 "string" filename1 ; -B for above and -C for both #grep #Linux #Tricks #Lines #Matches

    2719 days ago

  • Extract values : cat seeALN.xls | grep -w "scaffold_1" to #grep #exact #matching words from file seeALN.xls

    2636 days ago