Quote:
commands[1]="/student5/h4/03/pc/ab07/assignmentfolder/nha/s1/*";
|
This is just a guess, but * globs are usually unescaped by the shell. You may in fact be trying to copy a single file of name * from s1/ to test/, rather than un-globbing the filenames of the individual files.
Try this:
Code:
commands[0]="/bin/bash";
commands[1]="-c";
commands[2]="cp /student5/h4/03/pc/ab07/assignmentfolder/nha/s1/* test";
This will explicitly execute commands[2], using a BASH shell as an interpreter.