UTFOUT(1)
π UTFOUT β the manual page, but make it make sense
okay so bestie, gather round, because utfout is genuinely one of those little tools that's lowkey iconic once you get it. it's the utfout utility, and what it does is produce UTF-8 output to standard streams and a terminal. that's the whole vibe. it's giving "printf but with main character energy." β¨
πΈ NAME πΈ
utfout β a utility for producing UTF-8 output to standard streams and terminal. periodt.
π SYNOPSIS π
utfout [OPTION]... [STRING]...
π¦ DESCRIPTION π¦
Echo strings to specified output stream(s). that's it, that's the job. you hand it strings, it puts them places. no cap. π
β¨ OPTIONS β¨
one bullet per flag because we respect the source material in this house:
-a,--intra-char=<char>β insert the character you specify (and yeah, it can be a 1-character escape character) between all the output characters. sprinkle sprinkle.-b,--intra-pause=<delay>β pause between writing each character. dramatic typing noises, we love her.-e,--stderrβ write the strings that come after this to standard error (file descriptor 2).-h,--helpβ this help text. the classic.-i,--interpretβ interpret escape characters. this is the default, bestie.-l,--literalβ write literal strings only (escape characters get disabled, no interpreting here).-o,--stdoutβ write the strings that come after this to standard output (file descriptor 1).-p,--prefix=<prefix>β use<prefix>as the escape prefix. default is'\'.-r,--repeat=<repeat>β repeat the previous value<repeat>times. again again again.-s,--sleep=<delay>β sleep for<delay>amount of time. nap time, but make it milliseconds.-t,--terminalβ write the strings that come after this directly to the terminal. straight to the source, no middleman.-u,--file-descriptor=<fd>β write to the specified file descriptor.-x,--exit=<num>β exit with value<num>. bye babes. π
π ESCAPE CHARACTERS π
so utfout recognises the C-style escape sequences that printf(1) uses. by default an escape sequence is introduced by the backslash character ('\'), but you can swap that out with the -p option. she also supports some extra ones of her own:
\0β nul byte (hex value 0x00)\aβ alert (bell)\bβ backspace\cβ no further output\eβ escape character (used for changing terminal attributes)\fβ form feed\gβ generate pseudo-random printable character\nβ newline\oNNNβ byte with octal value NNN (1 to 3 digits)\rβ carriage return\tβ horizontal tab\uNNNNβ 2 byte Unicode (ISO/IEC 10646) character with hex value NNNN (4 digits)\UNNNNNNNNβ 4 byte Unicode (ISO/IEC 10646) character with hex value NNNNNNNN (8 digits)\vβ vertical tab\xNNβ byte with hexadecimal value NN (1 to 2 digits)
π RANGE ESCAPES π
not me being obsessed with this feature, but utfout also supports range escapes, which let you specify a whole range of characters in a compact little format. the way thatβ¦ π
\{N..N}β specify a range by two 1-byte literal characters.\{oNNN..oNNN}β specify a range by two 3-byte octal values.\{uNNNN..uNNNN}β specify a range by two 2-byte Unicode values.\{UNNNNNNNN..UNNNNNNNN}β specify a range by two 4-byte Unicode values.\{xNN..xNN}β specify a range by two 2-byte hex values.
heads up: ranges take two values of the same type, and the maximum width for that type must be specified. no mixing and matching, bestie, that's the rule.
π«Ά NOTES π«Ά
- Arguments are processed in order.
- With the exception of
'-x', arguments may be repeated any number of times. - All output will be sent to standard output until an output redirection option is specified that changes the output stream (namely
-eor-t(or their long-option equivalents), or if output has already been redirected-o(or its long-option equivalent)). - If
<str>is the empty string (""or'') it will be treated as\0such that a nul byte will be displayed. - To cancel the effect of
-a, specify a null string:-a ''. - If
<repeat>is'-1', repeat forever. (yes. forever. be careful lmao) - Replace the
'Z'in the range formats above with the appropriate characters. - Ranges can be either ascending or descending.
<delay>can take the following forms where<num>is a positive integer:
<num>ns : nano-seconds (1/1,000,000,000 second)
<num>us : micro-seconds (1/1,000,000 second)
<num>ms : milli-seconds (1/1,000 second)
<num>cs : centi-seconds (1/100 second)
<num>ds : deci-seconds (1/10 second)
<num>s : seconds
<num>m : minutes
<num>h : hours
<num>h : days
<num> : seconds
- If
<num>is-1, wait until any signal is received. If signal is SIGNUM continue, else exit immediately. - Generated printable random characters may not display unless you are using an appropriate font. π
π₯ EXAMPLES π₯
these are the real ones, copied exactly, go off:
# Print "foofoofoo" to stderr, followed by "barbar" to stdout.
utfout "foo" -r 2 -o "bar" -r 1
# Write 50 nul bytes direct to the terminal.
utfout -t "" -r 49
# Write continuous stream of nul bytes direct to the terminal,
# 1 per second.
utfout -b 1s -t '' -r -1
# Display a greeting slowly (as a human might type)
utfout -b 20cs "Hello, $USER.\n"
# Display a "spinner" that loops 4 times.
utfout -b 20cs -p % "%r|%r/%r-%r\%r" -r 3
# Display all digits between zero and nine with a trailing
# newline.
utfout "\{0..9}\n"
# Display slowly the lower-case letters of the alphabet,
# backwards without a newline.
utfout -b 1ds "\{z..a}"
# Display upper-case 'ABC' with newline.
utfout '\u0041\u0042\u0043\n'
# Display 'foo' with newline.
utfout '\o146\u006f\x6F\n'
# Clear the screen.
utfout '\n' -r $LINES
# Write hello to stdout, stderr and the terminal.
utfout 'hello' -t -r 1 -e -r 1
# Display upper-case letters of the alphabet using octal
# notation, plus a newline.
utfout "\{\o101..\o132}"
# Display 'h.e.l.l.o.' followed by a newline.
utfout -a . "hello" -a '' "\n"
# Display upper-case and lower-case letters of the alphabet
# including the characters in-between, with a trailing newline.
utfout "\{A..z}\n"
# Display lower-case alphabet followed by reversed lower-case alphabet
# with the digits zero to nine, then nine to zero on the next line.
utfout "\{a..z}\{z..a}\n\{0..9}\{9..0}\n"
# Display lower-case Greek letters of the alphabet.
utfout "\{Ξ±..Ο}"
# Display cyrillic characters.
utfout "\{Π..ΣΏ}"
# Display all printable ASCII characters using hex range:
utfout "\{\x21..\x7e}"
# Display all printable ASCII characters using 2-byte UTF-8 range:
utfout "\{\u0021..\u007e}"
# Display all printable ASCII characters using 4-byte UTF-8 range:
utfout "\{\U00000021..\U0000007e}"
# Display all braille characters.
utfout "\{\u2800..\u28FF}"
# Display 'WARNING' in white on red background.
utfout '\e[37;41mWARNING\e[0m\n'
# Generate 10 random characters.
utfout '\g' -r 9
π AUTHOR π
Written by James Hunt <james.hunt@ubuntu.com>. king behavior, honestly.
π COPYRIGHT π
Copyright Β© 2012 James Hunt <james.hunt@ubuntu.com>
π LICENSE π
GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
π§ SEE ALSO π§
and that's the whole page bestie, iykyk ππ
so yeah β this is from the User Commands manual, page UTFOUT(1), dated 2012-09-10. slay, go forth and emit UTF-8 responsibly. πβ¨π¦
π¦ where this page comes from
- debian bookworm: utfout 0.0.1-1+b1 Β· GPL-3.0-or-later
- debian trixie: utfout 0.0.1-2 Β· GPL-3.0-or-later
- ubuntu jammy: utfout 0.0.1-1build1 Β· GPL-3.0-or-later
- ubuntu noble: utfout 0.0.1-1build1 Β· GPL-3.0-or-later
- ubuntu questing: utfout 0.0.1-2
- ubuntu resolute: utfout 0.0.1-2build1 Β· GPL-3.0-or-later
- ubuntu stonking: utfout 0.0.1-2build1 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms