1 | 2 | 3 | 4 |
---|---|---|---|
awk | sed | shell | python |
sed
replace all the words "ugly" with "beautiful":
sed -i 's/ugly/beautiful/g' /home/bruno/old-friends/sue.txt
replace all the words "ugly*" with "beautiful":
sed -i 's/ugly.*/beautiful/g' /home/bruno/old-friends/sue.txt
replace all the words "ugly*" with $VAR:
sed -i 's/ugly.*/'"$VAR"'/g' /home/bruno/old-friends/sue.txt
shell
- rmp
rmp command:
rpm -ivh *.rpm # install
rpm -qpl *.rpm # list
rpm2cpio *.rpm | cpio -div # extract