sed
-i[SUFFIX], --in-place[=SUFFIX]
edit files in place (makes backup if SUFFIX supplied)
aaa
bbb
ccc
# sed -i.bak 's/aaa/abc/g' aaa
# ls -l
ÇÕ°è 12
-rw-r--r-- 1 root root 20 7¿ù 3 15:49 aaa
-rw-r--r-- 1 root root 20 7¿ù 3 15:50 aaa.bak :: aaa.bak ÆÄÀÏ·Î ¿øº»ÆÄÀÏ ÀúÀå
# sed -i.tmp 's/aaa/abc/g' aaa
# ls -l
ÇÕ°è 12
-rw-r--r-- 1 root root 20 7¿ù 3 15:49 aaa
-rw-r--r-- 1 root root 20 7¿ù 3 15:51 aaa.tmp :: aaa.tmp ÆÄÀÏ·Î ¿øº»ÆÄÀÏ ÀúÀå