CSV-style rows are useful when values are simple and commas are controlled. A header makes the column order explicit.

Program

Play the script to choose a count and see the generated CSV row.

csv_row.sh
#!/usr/bin/env bash

count=
name="worker"
header="name,count"
row="$name,$count"
echo "$header"
echo "$row"
#!/usr/bin/env bash

count=
name="worker"
header="name,count"
row="$name,$count"
echo "$header"
echo "$row"
CSV Comma-separated output uses a fixed column order.
header A header line documents the meaning of each column.
simple values This pattern is safest when values do not contain commas or newlines.