Main index | Section 1 | Options |
The dpv utility has two main modes for processing input.
The default input mode, without
‘
The secondary input mode, with
‘
Data read in either mode is either thrown away
(default),
sent to a spawned instance of the program specified via
‘
With or without
‘
The following options are available:
| |
Display text below the file progress indicator(s). | |
| |
Display backtitle on the backdrop, at top-left, behind the dialog widget. When using Xdialog(1), this is displayed inside the window (at the top) followed by a separator line. | |
| Do not use the default interface of dialog(3), but instead spawn an instance of dialog(1). The path to dialog(1) is taken from the DIALOG environment variable or simply "dialog" if unset or NULL. |
| Debug mode. Print dialog prompt data to standard out and provide additional debugging on standard error. |
| Produce a short syntax usage with brief option descriptions and exit. Output is produced on standard error. |
| |
Customize the multi-file format string used to update the status line.
Ignored when using either
‘ | |
| |
Customize the single-file format string used to update the status line.
Ignored when using either
‘ | |
| Keep tite. Prevent visually distracting initialization/exit routines for scripts running dialog(1) several times. |
| |
Label size. If negative, shrink to longest label width. | |
| Line mode. Read lines from input instead of bytes. |
| Multi-input mode. Instead of reading bytes from standard input, read from a set of paths (one for each label). By default, each path is processed sequentially in the order given. |
| No overrun. If enabled, stop reading known-length inputs when input reaches stated length. |
| |
Display at-most num progress indicators per screen. If zero, display as many as possible. If negative, only display the main progress indicator. Default is 0. Maximum value is 10. | |
| |
Output data to file. The first occurrence of ‘%s’ (if any) in ‘file’ will be replaced with the label text. | |
| |
Mini-progressbar size. If negative, don't display mini-progressbars (only the large overall progress indicator is shown). If zero, auto-adjust based on number of files to read. When zero and only one file to read, defaults to -1. When zero and more than one file to read, defaults to 17. | |
| |
Display text above the file progress indicator(s). | |
|
Test mode.
Simulate reading a number of bytes, divided evenly across the number of files,
while stepping through each percent value of each file to process.
Appends
"[TEST MODE]"
to the status line
(to override, use‘ |
| |
Display
title
atop the dialog box.
Note that if you use this option at the same time as
‘ | |
| |
Update status line
num
times per-second.
Default value is
‘2’.
A value of
‘0’
disables status line updates.
If negative, update the status line as fast as possible.
Ignored when using either
‘ | |
|
Wide mode.
Allows long
text
arguments used with
‘ |
| Enable X11 mode by using Xdialog(1) instead of dialog(1) or dialog(3). |
| |
Execute
cmd
(viash(1))
and send it data that has been read.
Data is available to
cmd
on standard input.
With
‘ | |
DIALOG |
Override command string used to launch
dialog(1)
(requires‘ |
DIALOGRC | If set and non-NULL, path to ‘.dialogrc’ file. |
HOME | If ‘$DIALOGRC’ is either not set or NULL, used as a prefix to ‘.dialogrc’ (i.e.,‘$HOME/.dialogrc’). |
USE_COLOR | |
If set and NULL, disables the use of color when using dialog(1) (does not apply toXdialog(1)). | |
$HOME/.dialogrc | |
yes | dpv -l yes
Display progress while timing how long it takes yes(1) to produce a half-billion lines (usually under one minute; your results may vary):
time yes | dpv -Nl 500000000:yes
An example to watch how quickly a file is transferred using nc(1):
dpv -x "nc -w 1 somewhere.com 3000" -m label file
A similar example, transferring a file from another process and passing the expected size to dpv:
cat file | dpv -x "nc -w 1 somewhere.com 3000" 12345:label
A more complicated example:
tar cf - . | dpv -x "gzip -9 > out.tgz" \ $( du -s . | awk '{print $1 * 1024}' ):label
Taking an image of a disk:
dpv -o disk-image.img -m label /dev/ada0
Writing an image back to a disk:
dpv -o /dev/ada0 -m label disk-image.img
Zeroing a disk:
dpv -o /dev/md42 "Zeroing md42" < /dev/zero
Xdialog(1) does not wrap long prompt texts received after initial launch. This is a known issue with the ‘--gauge’ widget in Xdialog(1).
dialog(1) does not display the first character after a series of escaped escape-sequences (e.g., ``nbsp;' produces ``\'' instead of `` '). This is a known issue with dialog(1) and does not affect dialog(3) or Xdialog(1).
If your application ignores USE_COLOR when set and NULL before calling dpv(1) with color escape sequences anyway, dialog(3) and dialog(1) may not render properly. Workaround is to detect when USE_COLOR is set and NULL and either not use color escape sequences at that time or use unset(1) [(sh) 1] or unsetenv(1) [(csh) 1] to unset USE_COLOR, forcing interpretation of color sequences. This does not effect Xdialog(1), which renders the color escape sequences as plain text. See " embedded "\Z" sequences " in dialog(1) for additional information.
DPV (1) | November 2, 2021 |
Main index | Section 1 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.