Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
print-utf8(1)		    General Commands Manual		 print-utf8(1)

NAME
       print-utf8 -- prints UTF-8 strings

SYNOPSIS
       print-utf8		 [-n		    |		    --newline]
		  [-i indentation string | --indent indentation	string]
       print-utf8		[-n		   |		    --newline]
		  [-x	  console_width	    |	  --columns	console_width]
		  [-c string | --center	string]
       print-utf8		[-n		   |		    --newline]
		  [-x	  console_width	    |	  --columns	console_width]
		  [-I  file ...	 indentation  left   right   |	 --multiline--
		  indent indentation left right]
       print-utf8		 [-n		    |		    --newline]
		  [-x	  console_width	    |	  --columns	console_width]
		  [-C left right | --multiline-center left right]
       print-utf8		 [-n		    |		    --newline]
		  [-x	  console_width	    |	  --columns	console_width]
		  [-s left separator right | --separator left separator	right]
       print-utf8 [-b string | --size string]
       print-utf8 [-l string | --length	string]
       print-utf8 [-w string | --width string]
       print-utf8 [-a string | --size-length-width string]
       print-utf8 [-t |	--terminal-info]
       print-utf8 [-h |	--help]
       print-utf8 [-v |	--version]

DESCRIPTION
       print-utf8  is  a  simple program to print UTF-8	strings	in the console
       with  options  for  indentation,	 centering,  separator	as   well   as
       size/length/width  information.	If /dev/tty is not available to	obtain
       the terminal width and height, the default of 80x24 is assumed.

ARGUMENTS
       The following options are available:

       -n | --newline
	       Add a newline to	the output. Default: off.

       -i indentation string | --indent	indentation string
	       Indent the string by the	given number of	characters (columns in
	       the console). A negative	number leads to	left-justified text, a
	       positive	number leads to	right-justified	text.

       -c string | --center string
	       Center the string, using	indentation based on the current  con-
	       sole width.

       -m left right | --multiline-center left right
	       Reads  multiple lines from stdin, pads them to the same length,
	       and prints them centered	with given borders on left  and	 right
	       side.

       -s left separator right | --separator left separator right
	       Make  a separator, consisting of	a left part, a variable	number
	       of separator string occurrences,	as well	as a right part.   The
	       separator  string must have a width >= 1	to fill	the line. Oth-
	       erwise, a space (" ") is	used instead.

       -x console_width	| --columns console_width
	       Set number of columns (console width) for "center", "multiline-
	       center",	and  "separator"  functions  (see  above).   For  con-
	       sole_width=0,  the  current  console  width (or from 80,	if un-
	       known) is used.	For console_width<0, the current console width
	       (or from	80, if unknown)	plus console_width (subtraction, since
	       it is negative!)	is used.  Default:  0,	i.e.  current  console
	       width.

       -b string | --size string
	       Print  the  size	(bytes)	of the string without ANSI control se-
	       quences.

       -l string | --length string
	       Print the length	(in UTF-8 characters) of  the  string  without
	       ANSI control sequences.

       -w string | --width string
	       Print  the width	(columns in the	console) of the	string without
	       ANSI control sequences.

       -a string | --size-length-width string
	       Printf the size,	length and width of the	 string	 without  ANSI
	       control sequences.

       -t | --terminal-info
	       Print  current  width  and height of the	console.  Note that if
	       /dev/tty	is not available, the default of 80x24 is returned!

       -h | --help
	       Prints command-line parameters.

       -v | --version
	       Prints program version.

EXAMPLES
       print-utf8 --newline --center "This line	is centered in console width!"

       print-utf8 --newline --columns 80 --center "This	line is	centered in 80
	       columns!"

       print-utf8  --newline  --center	 '\x1b[38;2;241;71;29mThis   line   is
	       centered!\x1b[0m'

       figlet  "This is	a test!" | print-utf8 --newline	--multiline-center "<"
	       ">"

       figlet "This is another test!" |	print-utf8 -x -8 -n -C "<" ">"

       figlet Right | print-utf8 -n -I +72 "" ""

       figlet Left | print-utf8	-n -I -72 "" ""

       date +"%d. %m. %Y %H:%M:%S" | figlet -w 128 | ./print-utf8  -n  -C  "["
	       "]"

       print-utf8 -n -c	" This line is centered	in console width! "

       print-utf8 -n -x	80 -c "	This line is centered in 80 columns! "

       print-utf8 --indent -32 "Left: "	&& echo	"1234"

       print-utf8 --indent +32 "Right: " && echo "1234"

       print-utf8 --newline --separator	"<*" "=" "*>"

       print-utf8 --columns 80 --newline --separator "<*" "=" "*>"

       print-utf8 -n -s	"<" "="	">"

       print-utf8 --width "Test"

       print-utf8 --width "Test	"

       print-utf8 -b " Test "

       print-utf8 -l " Test "

       print-utf8 -w " Test "

       print-utf8 -a " Test "

       print-utf8 --terminal-info

       print-utf8 -n -s	"\e[1;34m" "" "\e[0m" ;

       print-utf8 -h

       print-utf8 --help

       print-utf8 --version
	       date +"%d. %m. %Y %H:%M:%S" | figlet -w 128 | \
	       print-utf8 -n -C	"\e[1;34m\e[1;31m" "\e[1;34m\e[0m" ;
	       print-utf8 -n -s	"\e[1;34m" "" "\e[0m"

       print-utf8 -n -s	"\e[1;31;5m" ""	"\e[0m"	;
	       echo  "ERROR   1234"  |	figlet	-w  128	 |  print-utf8	-n  -C
	       "\e[1;31;5m\e[25m" "\e[5m\e[0m" ;
	       print-utf8 -n -s	"\e[1;31;5m" ""	"\e[0m"

       print-utf8 -n -s	"\e[1;31;40;5m"	"" "\e[0m" ;
	       echo -e "Software Failure.   Press left mouse  button  to  con-
	       tinue.\nGuru Meditation #00000004.48454C50" | \
	       print-utf8 -n -C	"\e[1;31;40;5m\e[25m" "\e[5m\e[0m" ;
	       print-utf8 -n -s	"\e[1;31;40;5m"	"" "\e[0m"

       print-utf8 -n -x	44 -s "\e[1;32m" "" "\e[0m" ;
	       ls  /  |	 print-utf8 -n --multiline-indent -42 "\e[1;32m\e[34m"
	       "\e[1;32m\e[0m" ;
	       print-utf8 -n -x	44 -s "\e[1;32m" "" "\e[0m"

print-utf8		       November	28, 2025		 print-utf8(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=print-utf8&sektion=1&manpath=FreeBSD+Ports+15.0.quarterly>

home | help