Exposes Redis stream through the command line
Suppose we want to list all files containing both 'a'
and 'z'
characters
e.g. azores.txt, arizona.md.
Using multiple grep
processes.
We'll start by recursively scanning our file-system, filtering files containing 'a'
character using grep, these will be written into a redis stream fs
for later parallel consumption:
ls -R | grep a | xargs -L1 | redis-stream -s fs
To apply the second filter (files containing both 'a'
and 'z'
characters) we'll be pulling from the fs
stream using multiple consumers, feeding our data once again into grep
.
redis-stream -s fs | grep z
redis-stream -s fs | grep z
redis-stream -s fs | grep z