Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • The reason why I would like to try with AWK specifically is because I tried it with sed before: { sed -e '/^>/!s/\./X/' } And although this worked for most of the files, two did not get edited. However, with your sed code it worked! Thanks! Commented Apr 24, 2020 at 7:19
  • 3
    @TUnix That's because you lack the /g at the end of the s command. Your sed approach would only replace the first dot on each line, as if you had used sub() in place of gsub() in awk. Commented Apr 24, 2020 at 7:26