Como substituir caracteres alfanuméricos de comprimento fixo?
Estou tentando substituir String após alfanumérico de tamanho fixo usando apenas sed.
testing-1xs-a-2x-782b1x9.abc.txt
testing-12a-b-2y-486eee2.bcd.txt
testing-1a-c-2z-b62cx7d.cde.txt
Eu tentei este comando -sed 's/[a-zA-Z0-9]{7}.*//g'
Arquivo
Saída esperada:
testing-1xs-a-2x
testing-12a-b-2y
testing-1a-c-2z