Article 5552X [SOLVED] unable to grep the log file

[SOLVED] unable to grep the log file

by
nextStep
from LinuxQuestions.org on (#5552X)
Hi All,

I am trying to grep the below pattern from a remote server log.The remote log file have left/right parenthesis . I believe the grep is breaking when it reaches the left/right parenthesis,hence provided the regular expression in the grep statement.Could you please advise how to resolve this.

Log file as below.

ERROR Cruise is not available due to error while checking cruise price. Error detail: (Service.Itinerary)

Code:ssh username@${host[i]} grep -Poi "ERROR Cruise is not available due to error while checking cruise price. Error detail: '(?<=\().*(?=\))'" /home/folder1/file.loglatest?d=yIl2AUoC8zA latest?i=Quw0cQeWnmo:BsVNDo7r9RM:F7zBnMy latest?i=Quw0cQeWnmo:BsVNDo7r9RM:V_sGLiP latest?d=qj6IDK7rITs latest?i=Quw0cQeWnmo:BsVNDo7r9RM:gIN9vFwQuw0cQeWnmo
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments