Saturday, October 25, 2014

Below, I show 2 ways to extract every 4th line: lines 4 and lines 8 in somefile.

  1. sed
    $ sed -n '0~4p' somefile
    line 4
    line 8
    $

    0~4 means select every 4th line, beginning at line 0.

    Line 0 has nothing, so the first printed line is line 4.

    -n means only explicitly printed lines are included in output.

Wednesday, October 15, 2014

Rule of naming external reads:

Forward_SampleName and Reverse_SampleName

Tuesday, October 7, 2014

show all hidden files in mac os

  1. Open Terminal found in Finder > Applications > Utilities
  2. In Terminal, paste the following: defaults write com.apple.finder AppleShowAllFiles YES
  3. Press return
  4. Hold ‘alt’ on your keyboard, then right click on the Finder icon in the dock and click Relaunch.


defaults write com.apple.finder AppleShowAllFiles NO