Task: List environment variables and their values, escaping all semicolons with a backslash.
Command: env | sed 's/;/\\;/g'
Equivalent command: while IFS= read -r line; do echo "${line//;/\\;}"; done < <(env)