Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Shell script question

$
0
0
I am not sure which is the better way for the below shell script.

I need to find the below process running and sent it to the desired user.

please let me know which is most feasible right way.

Code:


ps -ef | grep "Server" > /shome/kk/text.txt
 
 cat /shome/kk/text.txt| mail -s "Email testing" ramesh@wide.com
 
rm /shome/kk/text.txt || echo "success"

---------- Post updated at 08:11 AM ---------- Previous update was at 08:00 AM ----------

output :

I have received only the subject. not the content of cat text.txt.

please let me know what I did wrong.

Viewing all articles
Browse latest Browse all 16232

Trending Articles