less will look in its environment to see if there is a variable called LESS
You can install LESS in one of the ~ / .profile files (.bash_rc, etc. etc.), and then at any time when you run less from the comand line, it will find LESS.
Try to add this.
export LESS="-CQaix4"
This is the setting I use, there are some built-in behaviors that can confuse you, so ...
You can find out what all this means from the help function in less , just press the h key and nose around, or run less --help.
change
I looked for help and noticed that there is -r option
-r -R .... --raw-control-chars --RAW-CONTROL-CHARS Output "raw" control characters.
I agree that the cat may be the most accurate match to your stated needs.
cat -vet file | less
Adds '$' to the end of each line and converts the char tab to visual '^ I'.
cat --help (edited) -e equivalent to -vE -E, --show-ends display $ at end of each line -t equivalent to -vT -T, --show-tabs display TAB characters as ^I -v, --show-nonprinting use ^ and M- notation, except for LFD and TAB
Hope this helps.
shellter Aug 04 '11 at 19:16 2011-08-04 19:16
source share