in reply to Re: Re: random file selection
in thread random file selection

Sorry. I guess I should have added a usage line.

scriptname [-N=number of files] path\*.ext

Eg. script -N=10 *.pl will print the names of 30 .pl files from the current directory.

script "c:\My Files\*" will print the names 30 files of any type from the specified directory.

You might need to play with it a bit to make it work under *nix.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller


Replies are listed 'Best First'.
Re: Re: Re: Re: random file selection
by Anonymous Monk on Jun 13, 2003 at 20:35 UTC
    I don't think that this works. Is there a simple explanation for it?
Re: Re: Re: Re: random file selection
by Anonymous Monk on Jun 13, 2003 at 20:29 UTC
    I don't think that this works. Is there a simple explanation for it?

      As your error messges gives line 17 as the culprit and the script I posted only had 15 lines, I can only assume that you have modifed your version in some way. However, unless you post your version so that I can see the modifications, I cannot even begin to guess as to the cause of the problem.


      Examine what is said, not who speaks.
      "Efficiency is intelligent laziness." -David Dunham
      "When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller