Have a problem with a binary running (such as Cobalt Strike)? Windows adds a carriage return character in addition to \n at the end of lines. This command simply removes it by substituting \r for an empty string using the linux stream edit command (sed).
sed "s/[.].*//" data.txt > cleaned.txt