Skip to main content
There's no point in using g if you're anchoring the regex to the beginning of the line.
Source Link
terdon
  • 10.6k
  • 5
  • 23
  • 48

Or a bit more verbose ...

perl -nle 'push @res, $_  while s/^>//g;; END {print  join "\n",@res}' myfile.fa

Or a bit more verbose ...

perl -nle 'push @res, $_  while s/^>//g; END {print  join "\n",@res}' myfile.fa

Or a bit more verbose ...

perl -nle 'push @res, $_  while s/^>//; END {print  join "\n",@res}' myfile.fa
Source Link
M__
  • 13k
  • 5
  • 28
  • 47

Or a bit more verbose ...

perl -nle 'push @res, $_  while s/^>//g; END {print  join "\n",@res}' myfile.fa