What does sed -i option do?

后端 未结 3 1230
长情又很酷
长情又很酷 2021-02-06 21:19

I\'m debugging a shell script and trying to find out the task performed by the following command:

sed -i \'1,+999d\' /home/org_user/data.txt

I

3条回答
  •  旧巷少年郎
    2021-02-06 22:00

    If -i option given, sed edit files in place.

       -i[SUFFIX], --in-place[=SUFFIX]
    
              edit files in place (makes backup if extension supplied)
    

    from sed(1)

    http://www.gnu.org/software/sed/manual/sed.html#Introduction

提交回复
热议问题