I'd like to pipe a command into a slower one, with a rather big (~200GB) buffer in between. Here is an example use-case:
command1 | buffer -f file.buffer | command2
Is there a command to do that? The ones I saw only buffered to memory.
Now that I think about it, would this achieve the desired result?
#!/bin/bash # buffer.sh FILE="$1" tail -F "$FILE" 2> /dev/null & cat > "$FILE"
Though I'm not sure how to stop the tail once it has read everything...