Created
October 14, 2018 02:16
-
-
Save bogstandard/8d5fa53c4e23ada73b31494ad783b8f6 to your computer and use it in GitHub Desktop.
open Nth most recent file in current directory
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# opens nth most recent file in current working directory | |
# use: nthrecent 5 | |
function nthrecent() { | |
( open "`ls -t . | head -n$1 | tail -n1`" ) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment