Supprimer les chaînes après la correspondance à EOL en utilisant la commande SED
# To explicitly delete everything that comes after ".com", just tweak your existing sed solution to replace ".com(anything)" with ".com":
sed 's/\.com.*/.com/' file.txt
Stupid Salmon