[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.log


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.log