Skip to content

Instantly share code, notes, and snippets.

@machiq
Last active November 6, 2018 19:44
Show Gist options
  • Select an option

  • Save machiq/6ef72ac89e5dc4b66d48a013a6a43caa to your computer and use it in GitHub Desktop.

Select an option

Save machiq/6ef72ac89e5dc4b66d48a013a6a43caa to your computer and use it in GitHub Desktop.

Revisions

  1. machiq revised this gist Nov 6, 2018. 2 changed files with 17 additions and 14 deletions.
    14 changes: 0 additions & 14 deletions stillImage-remove-meta-v001.sh
    Original file line number Diff line number Diff line change
    @@ -1,14 +0,0 @@
    #!/bin/bash
    #File: stillImage-remove-meta-v001.sh
    #
    # 2018-11-02 - Matt Crnich - v001 - Use exiftool to remove still image metadata
    #
    #

    echo "enter path"
    read path

    for srcImagePath in "$path"
    do
    find "$srcImagePath" -not -type d -not -path '*/\.*' -type f -name '*.jpg' -exec exiftool -all= {} \;
    done
    17 changes: 17 additions & 0 deletions stillImage-remove-meta-v003.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    #!/bin/bash
    #File: stillImage-remove-meta-v003.sh
    #
    # 2018-11-02 - Matt Crnich - v001 - Use exiftool to remove still image metadata
    # 2018-11-06 - Matt Crnich - v002 - quieted output
    # 2018-11-06 - Matt Crnich - v003 - added awk to calculate total number of processed files
    #
    #

    echo "enter path"
    read path

    for srcImagePath in "$path"
    do
    fileProcTotal=$(find "$srcImagePath" -not -type d -not -path '*/\.*' -type f -name '*.jpg' -exec exiftool -all= {} + | awk '{ sum += $1; } END { print sum; }')
    echo "$fileProcTotal" "total files processed"
    done
  2. machiq revised this gist Nov 6, 2018. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions stillImage-remove-meta-v001.sh
    Original file line number Diff line number Diff line change
    @@ -10,6 +10,5 @@ read path

    for srcImagePath in "$path"
    do
    find "$srcImagePath" -not -type d -not -path '*/\.*' -type f -name '*.jpg'
    exiftool -all= "$srcImagePath"
    find "$srcImagePath" -not -type d -not -path '*/\.*' -type f -name '*.jpg' -exec exiftool -all= {} \;
    done
  3. machiq created this gist Nov 2, 2018.
    15 changes: 15 additions & 0 deletions stillImage-remove-meta-v001.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    #!/bin/bash
    #File: stillImage-remove-meta-v001.sh
    #
    # 2018-11-02 - Matt Crnich - v001 - Use exiftool to remove still image metadata
    #
    #

    echo "enter path"
    read path

    for srcImagePath in "$path"
    do
    find "$srcImagePath" -not -type d -not -path '*/\.*' -type f -name '*.jpg'
    exiftool -all= "$srcImagePath"
    done