hi guys,

i'm trying to solve the following problem and cannot find any working solution. it might seem to be very specialized on the first sight, but i think it's pretty general (and probably pretty easy)

i'm using pbs pro queueing system and there is a tool called pbsdsh that runs given command and parameters on every node of a cluster allocated for a job. i.e.,

pbsdsh ls -la /path/to/file

will print info about file on every node where it is run. however,

pbsdsh ls -la /path/to/file*

will not work because the wildcard is expanded on the 'master' host, i.e. the machine where this command was typed. this can be solved by

pbsdsh -- /bin/sh -c 'ls -la /path/to/file*'

i.e., executing a shell with some parameters. however in the following case, i'm lost:

export MASTER_HOST=`hostname`
export FILE_PATH=some_file_path
pbsdsh -- /bin/sh -c 'scp $FILE_PATH/file* $MASTER_HOST:'

because i want wildcard '*' to be expanded on the target machine and the variable to be expanded on the master host ($MASTER_HOST and FILE_PATH are not defined on the other nodes).

i would be very grateful for any hints how to accomplish this. it might be really easy, but i don't see any solution :(

thanks,

--
Lubos
[EMAIL PROTECTED]"


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to