Loop and iterating question

Cool :sunglasses: . Too many end statements though :expressionless:

# This program will iterate over all .jpg files in the given directory
# and tell their size

dirpath = "/home/arnuld/Pictures"

extensionName = ".jpg"

function runShellCommand(str)
    for(root, dirs, files) in walkdir(dirpath)
        println("Files in $root")
        for file in files
            s = joinpath(root, file)
            if(extensionName == splitext(s)[2])
                run(`ls -lh $s`)
            end
        end
    end
end

runShellCommand(extensionName)