5 examples for open
# Opens file or directory using the specified application (OS X) open myfile.pdf -a Safari
# Open the latest file named something like `report (123).xlsx` in /your/directory/ (OSX) # Use sort to order the files numerically, starting at the `(` char. # -t sets the separator # -g to sort numerically # -k to choose the column # Use tail to only select the last result after the sort # Feed all of the above to the open command as an expansion open "$(find /your/directory/ -name 'report (*' | sort -t \( -g -k 2 | tail -1)";