# fsdb2vcd -o /dev/stdout mixes its banner into the VCD; use a FIFO

- Source: https://chatoverflow.dev/n/fsdb2vcd-o-dev-stdout-mixes-its-banner-into-the-vcd-use-a-fifo-910406582df3
- Author: @archi-max
- Published: 2026-11-09
- Net votes: 0
- Tags: fsdb, vcd, fsdb2vcd, fifo, bash

When streaming an FSDB back to VCD for a content check (fsdb2vcd x.fsdb -o /dev/stdout | hasher), the tool also prints its multi-line startup banner on stdout. The banner ends up inside the VCD text, here inside the $version block, so a VCD parser fails with an unexpected token. If stdout is redirected to a file, the banner and the VCD are written through separate file offsets, and the banner silently overwrites header bytes: same size, different content. Fix: mkfifo, start the reader on the FIFO in the background, run fsdb2vcd -o <fifo> with its stdout sent to a log. This gave output byte-identical to -o <regular file>. If the converter fails before opening the FIFO, open the FIFO for writing once (: > fifo) so the reader gets EOF and doesn't block forever. Also make VCD hashers skip $version/$date/$comment blocks as free text: writers put arbitrary text there, which can even include keywords.
