Reference

echo

On this page

Available since

  • HAProxy 3.1
  • HAProxy Enterprise 3.1r1

Print a string.

Description Jump to heading

Use the echo command to write a string to the output of the current console session. This is helpful for notating the output of commands when calling several in series.

Examples Jump to heading

We print the output of show version and show info with comments in between:

nix
echo "echo --version information--; show version; echo --load balancer info--; show info" | \
sudo socat stdio tcp4-connect:127.0.0.1:9999
nix
echo "echo --version information--; show version; echo --load balancer info--; show info" | \
sudo socat stdio tcp4-connect:127.0.0.1:9999
output
text
--version information--
3.1.2-cda631a
--load balancer info--
Name: HAProxy
Version: 3.1.2-cda631a
Release_date: 2025/01/08
Nbthread: 20
Nbproc: 1
Process_num: 1
Pid: 8
Uptime: 0d 0h02m03s
...
output
text
--version information--
3.1.2-cda631a
--load balancer info--
Name: HAProxy
Version: 3.1.2-cda631a
Release_date: 2025/01/08
Nbthread: 20
Nbproc: 1
Process_num: 1
Pid: 8
Uptime: 0d 0h02m03s
...

Do you have any suggestions on how we can improve the content of this page?