OK, I am stumpped. I need a shell Script that will randomly select a file with the extention of .sct. The using a portion of its file name select the six related .mot files. Then move them all to another folder. I also need a user input for the number of files to randomly select.
So I have a file structure like this:
123-12345-00.sct 123-12345-00.mot 123-12345-01.mot 123-12345-02.mot 123-12345-03.mot 123-12345-04.mot 123-12345-05.mot 123-12346-00.sct 123-12346-00.mot 123-12346-01.mot 123-12346-02.mot 123-12346-03.mot 123-12346-04.mot 123-12346-05.mot
And so on. Need to randomly select the file .sct and move it and its related files to another directory. Hopefully I have explained this good enough.
Thanks for the help. I could do this in VB but this UNIX thing has me stumpped. Right now we do it manualy through thousands of files.
Scott