i am doing the following in a bash script:
Code:
while [ 1 ]
do
ps -ef | grep myprocessname | wc -l >>myfile
sleep 1
done
And this is working. But I need to modify it to do the following:
1. Output the date and time beside the count in myfile
2. echo the output to screen.
How can I do this?