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*

6
  • Only with GNU sed though. Commented Jul 4, 2018 at 8:42
  • @Kusalananda, are you sure? sed --posix 's/\d26//g' works. Commented Jul 4, 2018 at 8:44
  • With any other sed implementation, s/\d26//g would delete all instances of the literal string d26. Using --posix does not disable extensions in GNU sed's regular expression library. Commented Jul 4, 2018 at 8:47
  • Fascinating. @Kusalananda, you are right (as usual). Commented Jul 4, 2018 at 10:04
  • The second solution use both sed and tr when tr is good enougth by itself: tr -d '\032' <file >newfile. Commented Jul 4, 2018 at 16:08