看板FreeBSD
標 題關於less
發信站中大資管龍貓資訊天地 (Sun Apr 11 05:48:33 2004)
轉信站ptt!ctu-reader!ctu-peer!news.nctu!freebsd.ntu!news.ntu!news.mcu!news.c
我看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