findimagedupes should honor bash IFS in its output

Bug #1079788 reported by flumen haggen
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
findimagedupes (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

As an util to be used in a shell environment, I fount the need customize the output to be more computer friendly.

I should be enought to get the output honor IFS variable. Right now, always space (' ') is used as IFS, unusable if you are working with space separated paths.

I cannot find a place to send the patch upstream. Thats because I use launchpad instead.

Description: Ubuntu 12.10
Release: 12.10

findimagedupes:
  Installed: 2.18-4build2
  Candidate: 2.18-4build2
  Version table:
 *** 2.18-4build2 0
        500 http://bouyguestelecom.ubuntu.lafibre.info/ubuntu/ quantal/universe amd64 Packages
        100 /var/lib/dpkg/status

Tags: patch
Revision history for this message
flumen haggen (lumen-bulma) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "findimagedupes_honor_ifs_bash_variable.patch" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in findimagedupes (Ubuntu):
status: New → Confirmed
Revision history for this message
Jonathan H N Chin (jhnc) wrote :

Hi, I am the author. Thank you for the suggestion.

It is not necessary to patch the code to do what you want.
The output is generated by running a shell script (which can be viewed with -s).
By default, the function VIEW simply does 'echo "$@";'. This can be overridden by -i/-I.

So, you could accomplish your aim by something like, for example:

    findimagedupes -i 'export IFS=":"' -i 'VIEW(){ echo "$*"; }' -- *.jpg

Note that the script should correctly escape filenames even without this:

    findimagedupes -s scriptfile --- *.jpg
    more scriptfile

-jonathan

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.