LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

hr

prints horizontal rules in the terminal

TLDR

Print a horizontal rule using the default # character
$ hr
copy
Print a horizontal rule with a specific character
$ hr [=]
copy
Print multiple horizontal rules with different characters
$ hr [#] [-]
copy
Print a horizontal rule with a multi-character pattern
$ hr [-#-]
copy

SYNOPSIS

hr [characters ...]

DESCRIPTION

hr prints horizontal rules spanning the terminal width. Each argument is used as a character or pattern to repeat across one line. If no argument is given, # is used by default. Multiple arguments produce multiple lines, one per argument.
The terminal width is determined by `tput cols`, falling back to the COLUMNS environment variable or 80 columns if neither is available.

CAVEATS

Multiple implementations of hr exist with different features. The most common (LuRsT/hr) is a pure Bash script with no flags or options. Other implementations may support additional features like color or width control.

SEE ALSO

echo(1), printf(1), tput(1)

Copied to clipboard
Kai