less 裡有的內建的 `^` `$` 書籤可以和 `|` 搭配使用

linux less 裡 `|` 可以把內容用管道傳給指令,我以前就知道這個。
但是 `|` 會要求輸入書籤過的位置,只會 pipe mark 和現在位置間的內容,
以前我都是要先 `g` 回頭頂部 `m` 標書籤,再 G 到最底部 pipe。

今天發現 less 有二個特殊書籤 `^$` 代表頂部或底部,
可以直接在最頂部輸入 `|$` 把整個 buffer pipe 出去,
或是 `|^` 在底部。

0

If you have a fediverse account, you can quote this note from your own instance. Search https://taiwan.wtf/users/gholk/statuses/115395819710542519 on your instance and quote it. (Note that quoting is not supported in Mastodon.)