Entering edit mode
8.5 years ago
Shicheng Guo
★
9.4k
Suppose the contents of the a.fa is as the following:
> a b c
> d_b c.m
The following code were used to remove the space of the head line in a.fa
. What's difference between these two script? and Why?
perl -lane "s/\s+/_/g if /^>/; print " a.fa
perl -lane "s/\s+/_/g if /^>/; print $_" a.fa