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.

5
  • diff against the output of sed? <()
    – Tom Yan
    Commented Aug 18, 2021 at 3:44
  • @TomYan Seems diff <(cat A.txt | sed 's/\s//g' | sed 's/ //g') <(cat B.txt | sed 's/\s//g' | sed 's/ //g') works in my case. Though quite ugly...
    – tsh
    Commented Aug 18, 2021 at 4:04
  • First of all you don't need cat. sed can take a file as input, just don't use -i. Besides sed s/\(\s\| \)//g should probably work (not sure about portability whatsoever).
    – Tom Yan
    Commented Aug 18, 2021 at 4:37
  • What are settings for locale? Commented Aug 18, 2021 at 5:33
  • @RomeoNinov locale command says LANG=C.UTF-8, LC_CTYPE="C.UTF-8", ... I hadn't touched that setting before. Should I set locale to something else?
    – tsh
    Commented Aug 18, 2021 at 9:54