2 Highlight that solution is for Mac OS X. Note that changes are needed to make work on Linux.
source | link

Here’s a Bashbash script for Mac OS X orMac OS X. It may work on Linux with some changes.

#!/bin/bash
read -p "Delete JPEGs when DNG exists? Ctrl-C to cancel. [Enter] to continue: "

for FILE in *.dng; do
  JPG_FILE=$(echo "$FILE" | sed "s/dng/jpg/g")
  rmtrash "${JPG_FILE}" 1>/dev/null
done

rmtrash is a utility that moves files to the Trash, instead of deleting them outright. You You can get it from MacPorts thus:

sudo port install rmtrash

If you’d like to avoid that, just replace rmtrash in the script with rm, which will immediately delete the JPGsJPG files.

Here’s a Bash script for Mac OS X or Linux.

#!/bin/bash
read -p "Delete JPEGs when DNG exists? Ctrl-C to cancel. [Enter] to continue: "

for FILE in *.dng; do
  JPG_FILE=$(echo "$FILE" | sed "s/dng/jpg/g")
  rmtrash "${JPG_FILE}" 1>/dev/null
done

rmtrash is a utility that moves files to the Trash, instead of deleting them outright. You can get it from MacPorts thus:

sudo port install rmtrash

If you’d like to avoid that, just replace rmtrash in the script with rm, which will immediately delete the JPGs.

Here’s a bash script for Mac OS X. It may work on Linux with some changes.

#!/bin/bash
read -p "Delete JPEGs when DNG exists? Ctrl-C to cancel. [Enter] to continue: "

for FILE in *.dng; do
  JPG_FILE=$(echo "$FILE" | sed "s/dng/jpg/g")
  rmtrash "${JPG_FILE}" 1>/dev/null
done

rmtrash is a utility that moves files to the Trash, instead of deleting them outright. You can get it from MacPorts thus:

sudo port install rmtrash

If you’d like to avoid that, just replace rmtrash in the script with rm, which will immediately delete the JPG files.

1
source | link

Here’s a Bash script for Mac OS X or Linux.

#!/bin/bash
read -p "Delete JPEGs when DNG exists? Ctrl-C to cancel. [Enter] to continue: "

for FILE in *.dng; do
  JPG_FILE=$(echo "$FILE" | sed "s/dng/jpg/g")
  rmtrash "${JPG_FILE}" 1>/dev/null
done

rmtrash is a utility that moves files to the Trash, instead of deleting them outright. You can get it from MacPorts thus:

sudo port install rmtrash

If you’d like to avoid that, just replace rmtrash in the script with rm, which will immediately delete the JPGs.