While trying to trim carriage return \n from a command, also removed the \n from the end as well, hence I am not able to execute the command.
The Below Command:
ps -ef| grep "xyz.jar" | cut -d ' ' -f2
Gives:
{newline}
12334{newline}
I wanted to append a kill -9 command with this, hence I needed the last {newline}, not the first one.
How can I delete just the first {newline} in this?