Queue/Definition: Difference between revisions
Content deleted Content added
Line 1,006: | Line 1,006: | ||
push() {echo $1 >> fifo } |
push() {echo $1 >> fifo } |
||
pop() {head -1 fifo ; (cat fifo | tail -n +2)|sponge fifo} |
pop() {head -1 fifo ; (cat fifo | tail -n +2)|sponge fifo} |
||
empty() {cat fifo | wc -l} |
|||
Usage: |
Usage: |
||
push me; push you; push us; push them |
push me; push you; push us; push them |