error in example in zenity man page
Bug #21683 reported by
Chris Moore
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
zenity (Ubuntu) |
Fix Released
|
Low
|
Daniel Holbach |
Bug Description
The 'zenity' man page has this example:
Display a progress dialog while searching for all the postscript files
in your home directory
find `echo $HOME` '*.ps' | zenity --progress --pulsate
That's not how find works. You need to use "-name" if you want find to find .ps
files. And what is the point of the backticks and the echo? Just "find $HOME"
is the same as "find `echo $HOME`".
This would be a better example:
find $HOME -name '*.ps' | zenity --progress --pulsate
Changed in zenity: | |
assignee: | nobody → dholbach |
To post a comment you must log in.
I don't find that it does anything useful, still; it throws away the results from the find, and if you press "cancel" while the dialog box is up, the script (or interactive shell) where this is run from gets a SIGHUP.
bash$ bash
bash$ PS1='in subshell> '
in subshell> find / | zenity --progress --pulsate
find: /etc/lvm/archive: Permission denied
find: /etc/lv[ Progress ]sion denied
find: /etc/ss| [ |||| ] |n denied
find: /var/li| [Cancel] |mission denied
find: /var/lib/gdm: Permission denied
find: /var/lib/slocate: Permission denied
find: /var/lock/lvm: Permission denied
find: /var/run/fetchmail: Permission denied
find: /var/run/sudo: Permission denied
Hangup
bash$ # yes, the subshell exited with "Hangup"
(I was going to post the same bug report about the superfluous backticks, but just happened to notice this additional flaw.)