I have a text file topcommand.txt which has a command as below:
* * * * * /usr/bin/top -c | grep 'some process name' >> /home/abcd/topout.txt
When I invoke this using crontab topcommand.txt, file topout.txt gets created but it is an empty file.
Is there something wrong with my top command?