具体来说:

TEXT=ts-office.desktop
FILE=mimeapps.list
sed -i '/${TEXT}/'d ${FILE}

当然,两个变量也可以直接写进命令中。