StarCluster - Mailing List Archive

sshmaster run shell with variables

From: Jian Feng <no email>
Date: Thu, 4 Dec 2014 14:11:35 -0800

Hi,

I am wondering if it is possible to remotely run commands with variables, sth like

#!/bin/bash
for i in {1..10}
do
  starcluster sshmaster mycluster 'bash -s' << 'ENDSSH'
  mkdir ~/$i
  ENDSSH
done

The previous script does not work because $i is not replaced by 1, 2, etc. Anyway a variable can be used inside the shell?

Thanks!
Received on Thu Dec 04 2014 - 17:11:36 EST
This archive was generated by hypermail 2.3.0.

Search:

Sort all by:

Date

Month

Thread

Author

Subject