본문 바로가기

Computer/Shell Programming

문자열 치환

FILE: .bash_mm.orig

== sed ==
sed -e "s/orig/new/g" .bash_mm.orig > .bash_mm.new

== perl ==
perl -pi -e "s/orig/new/g" .bash_mm.orig
cat .bash_mm.orig | perl -pi -e "s|new|b|g" > .bash_mm.new