看板 FreeBSD 關於我們 聯絡資訊
我看less的manpage, 看到: /pattern Search forward in the file for the N-th line containing the pat- tern. N defaults to 1. The pattern is a regular expression, as recognized by ed. The search starts at the second line dis- played (but see the -a and -j options, which change this). Certain characters are special if entered at the beginning of the pattern; they modify the type of search rather than become part of the pattern: ^K Highlight any text which matches the pattern on the cur- rent screen, but don't move to the first match (KEEP cur- rent position). 為什麼我每次 less test.txt時, /^Ktest 要找test字串,並要將match到的給highlight, less總是說pattern not found呢!! -- ◎(bbs.mgt.ncu.edu.tw) ◎[ethylene]From: 228161.D18-228.ncu.edu.tw