In my shell script, I have using below code:
RECORD=`ps -ef | grep sysProj | cut -d" " -f1,2` echo $RECORD on executing this, its printing
45646654 28770 45646654 32021 45646654 32176 but when I don't save command output in variable and executing as below:
ps -ef | grep sysProj | cut -d" " -f1,2 the output is:
45646654 28770 45646654 32021 45646654 32176 Why saving the command output in varible is suppressing new line character. Also, how can I retain it?