From 13fdcec332ca11a6cc40a54d90fb988cf90ffb75 Mon Sep 17 00:00:00 2001 From: Shadab Zafar Date: Sat, 16 Jul 2016 18:47:19 +0530 Subject: [PATCH] Add cheat on how to dump content of less to file --- cheat/cheatsheets/less | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cheat/cheatsheets/less b/cheat/cheatsheets/less index 329812d..55a7555 100644 --- a/cheat/cheatsheets/less +++ b/cheat/cheatsheets/less @@ -1,2 +1,9 @@ # To disable the terminal refresh when exiting -less -X \ No newline at end of file +less -X + +# To save the contents to a file +# Method 1 - Only works when the input is a pipe +s + +# Method 2 - This should work whether input is a pipe or an ordinary file. +Type g or < (g or less-than) | $ (pipe then dollar) then cat > and Enter.