Chém gió

Hiển thị các bài đăng có nhãn sed. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn sed. Hiển thị tất cả bài đăng

Thứ Năm, 21 tháng 11, 2013

Using regular expression format your text

find pattern in text (this kind of regular expression can be use with text editor like notepad++ or sublime):
to find any pattern you want replace text with pattern  :     ^.*pattern.*$
to find any blank line ^.\n
meaning of each character maybe in next post.
or can use sed command in linux box for search pattern:
sed '/^.*object.*$/d' ./filename.txt : this command will print all line NOT include "object" (without quote) of filename.txt in the terminal. 
or say: sed '/^.*object.*$/d' ./filename.txt >> newformatedtext.txt 
:)