Let's say I have a few directories, each running a different branch of a Meteor development server. I could
cd
meteor shell
meteor shell < 'DoJSThing()`
for d in ./*/ ; do (cd "$d" && meteor shell "doJSThing()" ); done
for
On the latest Meteor (I'm currently testing on 1.3), you can indeed use the syntax provided in that pull request:
$ echo Meteor.isServer | meteor shell
true
You can also write your JS to a file and use the <
syntax to pipe into stdin:
$ meteor shell < myfile
It's worth noting that if you name your JS file with a .js extension, it'll auto-load into the running Meteor app, which is potentially, but probably not, what you want.