1

I am trying to use less (in cygwin) with an initial command of &pattern:

printf 'A\nB\n' | less '+&B'

Give me the text "&/B" at the topleft of my screen, and I have to press ENTER to do the actual filtering.

I was expecting it to do the filtering right away.

(
printf 'A\nB\n' | less '+/B'
Here line B is at top of screen, without the need for pressing ENTER
)
xhienne
  • 5,738
  • 1
  • 15
  • 34

1 Answers1

1
printf 'A\nB\n' | less '+&B^M'

where ^M is CTRL+v plus RETURN on bash

matzeri
  • 8,062
  • 2
  • 15
  • 16