我正在尝试删除文本文件中行末的句号。有些行末有句号,而有些则没有:
$cat textfile
sometexthere.123..22.no_period
moretext_with_period. **<-- remove this period**
no_period_here_either
period. **<-- remove this period**
我尝试过这个方法,但好像并不起作用:
sed 's/\.$//g' textfile > textfile2
(GNU sed 版本4.2.1)
谢谢。
$ cat -vet textfile
的输出。 - MetaEdg
修饰符? - MetaEd