top | item 24242345 (no title) charliesome | 5 years ago Re sponge: the shell will open the output file for writing before invoking the command so in the example joey provides, /etc/passwd will be an empty file by the time sed opens it. discuss order hn newest samatman|5 years ago heh, yeah that's a mistake everyone makes once, and hopefully not more than once. prakashdanish|5 years ago That makes sense but in the example provided, why can't we use sed with the in-line flag? gpanders|5 years ago Because the -i flag works differently on GNU sed vs non-GNU sed and there is no way to use it portably.
samatman|5 years ago heh, yeah that's a mistake everyone makes once, and hopefully not more than once.
prakashdanish|5 years ago That makes sense but in the example provided, why can't we use sed with the in-line flag? gpanders|5 years ago Because the -i flag works differently on GNU sed vs non-GNU sed and there is no way to use it portably.
gpanders|5 years ago Because the -i flag works differently on GNU sed vs non-GNU sed and there is no way to use it portably.
samatman|5 years ago
prakashdanish|5 years ago
gpanders|5 years ago