[sed] To replace the line including a specific word.
Object.
- To replace the line including a specific word in file.
if you have a file below (to-love-list.txt)
i love you
i love us
i love her
i love him
i love them
you can execute the file with sed command.
$>sed 's/love/hate/g' subject.txt
result.
i hate you
i hate us
i hate her
i hate him
i hate them
right. the file is not changed from the command.
if you want to change executing the command, you should use "-i' option.
Referred Links
댓글
댓글 쓰기