A terminal transcript is useful when a reader can copy the command and compare what happens. Split the shell command and its output into separate Markdown blocks.
Name the input and show only the command
For this example, inventory.txt contains three entries, each followed by a newline. Run the command from the folder containing it:
wc -l < inventory.txt
Illustrated setup. State which file the command reads.
Label the output as output
For the sample file, the line count is:
3Use a separate fenced block in the Markdown source and keep any terminal prompt outside the copyable command. Some implementations of wc add leading spaces, so compare the count.

Illustrated copy test. A reader can copy the command without picking up the output.
Copy the rendered command into a clean shell using the same sample input. Compare the observed result with the documented block before sharing.



