6 ms·
I see, what about this then?:) Run the queue: mkfifo q ( while True; do sh q; done ) & Schedule jobs: echo wget http://mymirror/big1.iso > q echo wg
by soheil 6y ago
I see, what about this then?:)
Run the queue:
mkfifo q
( while True; do sh q; done ) &
Schedule jobs:
echo wget http://mymirror/big1.iso > q
echo wget http://mymirror/big1.iso > q
This has the added benefit of supporting multiple queues.
- CGamesPlay 6y agoWatch out, FIFOs don't have buffers, so that echo will block. Running the echos in the background causes a race condition on execution order.
- soheil 6y agoNamed pipes actually do have buffers, you might be thinking about unnamed pipes created by bash.