How can I prepend some custom text when opening a file in less
?
For example, I would like to see something like:
My custom title
Content of the opened file goes here...
I want a command for that like:
echo 'My custom title' | less file
less
does not have this feature. But it must be possible to achieve with some workaround. Basically, we need to sequentially combine two files into one and then open it. How can I create a temporary virtual file in RAM that will contain this new file to open in less
?
Similar question: