Results for "Tricks"

Tags

  • Little correction, I guess you mean concatenate many files: $ for a in *.txt ; do cat $a >> newFile ; done #Linux #Tricks

    Tags: Linux, Tricks

    2788 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

    Tags: grep, Linux, Tricks, Lines, Matches

    2712 days ago

  • Accept file from STDIN in Perl my $infh = \*STDIN; my $outfh = \*STDOUT #Perl #Tricks

    Tags: Perl, Tricks

    2688 days ago

  • Perl way to check if an array contains values

    Perl is always is known for their flexibility (There is more than one way to do it). Followings are the quick way to check if a value exist in an array. do_something if 'flour' ~~ @ingredients   # ~~ operand.   BEWARE: it is broken.do_something if grep {$_ eq 'flour'} @ingredients ...

    Tags: Perl, Tricks, Array, Find, Check

    2605 days ago

  • Remove all blank lines from file. perl -i.bak -n -e "print if /\S/" ../finalSample.fa #Perl #Tricks #PerlOneliner

    Tags: Perl, Tricks, PerlOneliner

    2612 days ago

  • Show before(B) and after(A) the matching region $ grep -B 3 -A 2 foo README.txt #Linux #Tricks #View #Grep

    Tags: Linux, Tricks, View, Grep

    2551 days ago

  • Nano tricks https://wiki.gentoo.org/wiki/Nano/Basics_Guide #Nano #Tricks

    Tags: Nano, Tricks

    1830 days ago