linuxless-unix

Linux : less cannot search case insensitive using -i


Consider:

Enter image description here

If searching using ?cm02csdate -i, it fails:

Enter image description here

But if searching using ?CM02CSDATE, it can be found:

Enter image description here

Enter image description here

I searched the man page. It also said using -i to search case insensitive, as the following shows:

Enter image description here

So why does it fail when I use ?cm02csdate -i?


Solution

  • The -i flag should be given to less. I.e. less -i <filename> or some_program | less -i.