2018-05-21 21:14:41 +02:00
|
|
|
---
|
|
|
|
functions:
|
2018-10-05 19:55:38 +02:00
|
|
|
shell:
|
2018-07-16 15:01:50 +02:00
|
|
|
- code: |
|
|
|
|
less /etc/profile
|
|
|
|
!/bin/sh
|
|
|
|
- code: |
|
|
|
|
VISUAL="/bin/sh -c '/bin/sh'" less /etc/profile
|
|
|
|
v
|
2018-07-04 20:26:52 +02:00
|
|
|
file-read:
|
2018-07-16 15:01:50 +02:00
|
|
|
- code: less file_to_read
|
2019-04-08 11:26:10 +02:00
|
|
|
- description: This is useful when `less` is used as a pager by another binary to read a different file.
|
|
|
|
code: |
|
|
|
|
less /etc/profile
|
|
|
|
:e file_to_read
|
2018-08-24 12:32:06 +02:00
|
|
|
file-write:
|
|
|
|
- code: |
|
|
|
|
echo DATA | less
|
|
|
|
sfile_to_write
|
|
|
|
q
|
2019-04-08 11:26:10 +02:00
|
|
|
- description: This invokes the default editor to edit the file. The file must exist.
|
|
|
|
code: |
|
|
|
|
less file_to_write
|
|
|
|
v
|
2018-10-05 19:55:38 +02:00
|
|
|
sudo:
|
2018-07-16 15:01:50 +02:00
|
|
|
- code: |
|
|
|
|
sudo less /etc/profile
|
|
|
|
!/bin/sh
|
2018-10-05 19:55:38 +02:00
|
|
|
suid:
|
2018-08-24 13:30:23 +02:00
|
|
|
- code: ./less file_to_read
|
2018-05-25 00:57:42 +02:00
|
|
|
---
|