Suppose I have a list of URLs in a text file: google.com/funny unix.stackexchange.com/questions isuckatunix.com/ireallydo I want to delete everything that comes after '.com'. Expected Results: google.com unix.stackexchange.com isuckatunix.com I tried sed 's/.com*//' file.txt but it deleted `.com` as well.