Reputation: 179
I use evince to open a .pdf file. I know how to find the latest file by
ls -Art | tail -n 1
Is there a way to use only one command line to combine the above two, to "open the latest file?" Or, if not possible, in the second line, I can let my last result, e.g., latest.pdf to pop up when I use evince?
Thanks!
Upvotes: 0
Views: 196
Reputation: 12895
Yes, just pass your command to evince:
evince $(ls -Art | tail -n 1)
Upvotes: 1