سؤال

My search term is

ack @RequestMapping("/example_path")

and bash is complaining with

-bash: syntax error near unexpected token `('

How can I search for the above text from bash the easiest way. All my attempts to escape the characters have not brought results.

هل كانت مفيدة؟

المحلول

Try this.

ack '@RequestMapping\("/example_path"\)'

Or, as Andy suggested:

ack -Q '@RequestMapping("/example_path")'
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top