Skip to content
Advertisement

Getting unexpected newline error while doing awk

I am running the following script in linux command line:

JavaScript

I am getting the following error:

JavaScript

I believe the quotes and spaces are consistent, but why am i still getting this error?

Output of ps -ef | grep "java -Droute=full"

JavaScript

Advertisement

Answer

The actual problem you’re trying to solve is something like “How to kill the process whose command line contains java -Droute=full.

A much easier, safer way is to just use pkill:

JavaScript

This replaces your entire script.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement