The Archives

  • 17.Jan.09
    Less can do more… scripts, shell | fernape | (0)
    ... more than you think ;) less is a command that allows you to view and move forward and backwards in a file among other things. But the interesting thing is that less allows you to define a preprocessor. You can set it as the form of a shell script specified in the LESSOPEN environment variable. $ echo $LESSOPEN %s This is the script that will be invoked before the actual less command (located in /usr/bin/less) is executed. The result of the script must be something readable. If you take a look at the script you will find what kind of files can ...