關於less
我看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
討論串 (同標題文章)
FreeBSD 近期熱門文章
PTT數位生活區 即時熱門文章