Thanks... it helps me so much...
But, another question: and if I have more than one program started that has the same name but diferent options (like tail something > /dev/tty8 and tail something > /log.txt)... how can I take the pid just of the first one or the second one?
If I run pidof -s I get the first one but the next time I run that tail it will be the second one...
But if I have more tail's or another programs?
What can I do for get the specified pid?
Thanks a lot
