What does sed -i option do?

后端 未结 3 1225
长情又很酷
长情又很酷 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 21:46

    Some implementations of sed do not support the -i option. What it does can be simulated by

    sed -e '...' file > tmp
    mv tmp file
    

提交回复
热议问题