TAILIEUCHUNG - Minimal Perl For UNIX and Linux People 3

Mặc dù phiên bản hiện đại của grep có các tính năng bổ sung, các chức năng cơ bản của grep tiếp tục được xác định và khai thác các dòng phù hợp với một mô hình. Đây là một dịch vụ đơn giản, nhưng nó đã trở thành một người sử dụng Shell không thể sống mà không có. Chú ý Bạn có thể nói rằng grep là sau ® lưu ý các tiện ích phần mềm, theo nghĩa rằng nó ngay lập tức đã trở thành một phần không thể tách rời của văn hóa tính toán, và người sử. | Although modern versions of grep have additional features the basic function of grep continues to be the identification and extraction of lines that match a pattern. This is a simple service but it has become one that Shell users can t live without. NOTE You could say that grep is the Post-It note of software utilities in the sense that it immediately became an integral part of computing culture and users had trouble imagining how they had ever managed without it. But grep was not always there. Early Bell System scientists did their grepping by interactively typing a command to the venerable ed editor. This command which was described as globally search for a regular expression and print was written in documentation as g RE Later to avoid the risks of running an interactive editor on a file just to search for matches within it the UNIX developers extracted the relevant code from ed and created a separate non-destructive utility dedicated to providing a matching service. Because it only implemented ed s g RE p command they christened it grep. But can grep help the System Administrator extract lines matching certain patterns from system log files while simultaneously rejecting those that also match another pattern Can it help a writer find lines that contain a particular set of words irrespective of their order Can it help bad spellers by allowing libary to match library and Linux to match Lunix As useful as grep is it s not well equipped for the full range of tasks that a pattern-matching utility is expected to handle nowadays. Nevertheless you ll see solutions to all of these problems and more in this chapter using simple Perl programs that employ techniques such as paragraph mode matching in context cascading filters and fuzzy matching. We ll begin by considering a few of the technical shortcomings of grep in greater detail. Shortcomings of grep The UNIX ed editor was the first UNIX utility to feature regular expressions regexes . Because the classic grep

TỪ KHÓA LIÊN QUAN
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.