How to print the length of the shortest filename in Julia

Written by Administrator on Sunday May 10, 2020

Create a file "shortest_filename.jl" and put following code into it:

files = readdir(pwd())
info = Dict{String,Integer}()
println("The shortest filename has length: ",minimum(values(info)))

List of files:

$ bookings   count_files.jl  libs  list_only_files.jl
books.txt  hello-world.jl  list_only_dirs.jl  show_longest_filename.jl

Output:

$ julia show_longest_filename.jl 
The shortest filename has length: 4