Listing 1:

#!/bin/bash
for i in *.png; do convert “$i” “${i%.*}.jpg”; done

 

Listing 2:

#!/bin/bash
for i in *.png; do convert “$i” “${i%.*}.jpg”; rm “$i”; done

 

Listing 3:

#!/bin/bash
find . -type f -name “*.png” -exec bash -c ‘FILE=”$1″; convert “${FILE}” “${FILE%.*}.jpg”; ‘ _ ‘{}’ \;

 

Listing 4:

#!/bin/bash
find . -type f -name “*.png” -exec bash -c ‘FILE=”$1″; convert “${FILE}” “${FILE%.*}.jpg”; rm “$FILE”; ‘ _ ‘{}’ \;

 

Listing 5:

#!/bin/bash
for i in *.mp3; do ffmpeg -i “$i” “${i%.*}.aac”; done

 

Listing 6:

#!/bin/bash
for i in *.mp3; do ffmpeg -i “$i” “${i%.*}.aac”; rm “$i”; done

 

Listing 7:

#!/bin/bash
find . -type f -name “*.mp3″ -exec bash -c ‘FILE=”$1”; ffmpeg -i “${FILE}” “${FILE%.*}.aac”; ‘ _ ‘{}’ \;

 

Listing 8:

#!/bin/bash
find . -type f -name “*.mp3″ -exec bash -c ‘FILE=”$1”; ffmpeg -i “${FILE}” “${FILE%.*}.aac”; rm “$FILE”; ‘ _ ‘{}’ \;

 

Listing 9:

#!/bin/bash
for i in *.”$1″; do convert “$i” “${i%.*}.jpg”; done

 

Listing 10:

#!/bin/bash
for i in *.”$1″; do convert “$i” “${i%.*}.$2”; done