Perl regex to act on a file from the command line

后端 未结 3 1647
一生所求
一生所求 2020-12-18 03:52

In a file, say xyz.txt i want to replace the pattern of any number followed by a dot example:1.,2.,10.,11. etc.. with a whitespace. How to compose a perl command on the comm

3条回答
  •  一向
    一向 (楼主)
    2020-12-18 04:46

    Both

    perl -ipe "s/\d+\./ /g" xyz.txt
    

    and

    perl -pie
    

    cannot execute on my system.

    I use the following order:

    perl -i -pe
    

提交回复
热议问题