I'm trying to write a script to pull a PID number out of a file and then pipe that into the kill command.

For example..I wrote a start script to start a daemon, but I need to write a stop script as well to stop the daemon....when the daemon is started it creates a file "file.pid" which holds the process number that the daemon started with. I need to pull that number from the .pid file and feed it to the kill command.

I'm not the best programmer in the world, but if somebody can give me the syntax or what not for that, i can probably take it from there...or if someone has a better idea I'm open to that as well....I tried killall, but no joy.