- Create
enqueue.sh
andconsumer.sh
with the below contents. - start
consumer.sh
in the shell where you want to run commands - use
enqueue.sh echo hello
to run echo hello in the other shell
Optionally:
- use environment variable FIFO=./queue2 consumer.sh to use a different queue