vi
:%s/old_word/new_word/g
replace old_word with the new_word in whole file.
:g/s1/s/s2/s3/g
replace s2 with s3 only in the lines that include string s1
HP-UX:SHELL:VI
最新推荐文章于 2018-12-13 20:12:03 发布
vi
:%s/old_word/new_word/g
replace old_word with the new_word in whole file.
:g/s1/s/s2/s3/g
replace s2 with s3 only in the lines that include string s1