I am creating a script to write zero data to a CF card (Don't ask. It's stupid but I have to do it anyway)
sudo watch dd if=/dev/zero of=/dev/sdb bs=4k > mylog & tail mylog
My question is three parts.
1) Using the line above, why does the dd action stop? If I take the " & tail mylog" off, it works and writes to the file just fine.
2) Why can I not get this to run in a script from a desktop icon?
3) Is there a better way to do this? It has to be easy for the end user so the hope would be a double click on the desktop icon, password for sudo is fine and then the process runs with an easy to read status.
I have several more action icons to make after this one so hopefully this will get me on the right track.