GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
print-utf8(1) FreeBSD General Commands Manual print-utf8(1)

print-utf8Print UTF-8 strings

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

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.

The following options are available:

|
Prints command-line parameters.
|
Prints program version.
|
Add a newline to the output. Default: off.
indentation string | 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.
string | string
Center the string, using indentation based on the current console width.
left right | 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.
left separator right | 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. Otherwise, a space (" ") is used instead.
console_width | console_width
Set number of columns (console width) for "center", "multiline-center", and "separator" functions (see above). For console_width=0, the current console width (or from 80, if unknown) 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.
string | string
Print the size (bytes) of the string without ANSI control sequences.
string | string
Print the length (in UTF-8 characters) of the string without ANSI control sequences.
string | string
Print the width (columns in the console) of the string without ANSI control sequences.
string | string
Printf the size, length and width of the string without ANSI control sequences.
|
Print current width and height of the console. Note that if /dev/tty is not available, the default of 80x24 is returned!

print-utf8 -h
 
print-utf8 --help
 
print-utf8 --version
 
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" ;

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 continue.\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"
May 11, 2025 print-utf8

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.