Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Open a random file in the GUI via a bash script' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Open a random file in the GUI via a bash script
Authored by: kenahoo on Nov 14, '05 06:59:51PM
Oops, I forgot about the restrictions on extensions:

  @files = glob("/Users/me/Documents/Writings/*.{rtf,doc,txt}");
  exec "open", "-e", $files[rand @files];
-Ken

[ Reply to This | # ]