Skip to content

Instantly share code, notes, and snippets.

@torgeir
Created November 2, 2011 09:39
Show Gist options
  • Save torgeir/1333268 to your computer and use it in GitHub Desktop.
Save torgeir/1333268 to your computer and use it in GitHub Desktop.
how to message daemon process - bash pipe as stdin
# create pipe, tail it, and read from stdin in a program
mkfifo namedPipe; tail -f namedPipe | while true; do read msg; echo $msg; done;
# now send messages from another shell
echo "start" > namedPipe
echo "stop" > namedPipe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment