sed - stream editor
Postano: 21 stu 2011, 18:13
cool stvar!
http://how-to.linuxcareer.com/learning- ... ux-News%29
Primjeri:
Replace every occurrence of Nick with John in report.txt
Delete all spaces in front and at the end of every line of file.txt
Delete all blank lines from a file
http://how-to.linuxcareer.com/learning- ... ux-News%29
Primjeri:
Replace every occurrence of Nick with John in report.txt
Kod: Označi sve
sed 's/Nick/John/g' report.txtKod: Označi sve
sed 's/^[ ^t]*//;s/[ ^]*$//' file.txtKod: Označi sve
sed '/./!d' file.txt