[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ESPResSo] RE: using external arguments in a tcl script
From: |
Christopher Jesudason |
Subject: |
Re: [ESPResSo] RE: using external arguments in a tcl script |
Date: |
Mon, 3 Sep 2007 09:28:29 -0700 (PDT) |
Hi,
The output for the input is as follows:
address@hidden tests]$ ./espa argment2.tcl A B C
0: Script directory:
/a1/christopherg/collect//lib/espresso/scripts
*******************************************************
*
*
* - Espresso -
*
* ============
*
* A MPI Parallel Molecular Dynamics Program
*
*
*
*
*
* (c) 2002-2006
*
* Max-Planck-Institute for Polymer Research
*
* Mainz, Germany
*
*
*
*******************************************************
the command was: argment2.tcl
The first argument was: 1
The arguments were : 1
number of words was: 1
and the tcl script was
#!/bin/sh
#### tricking... the line after a these comments are
interpreted as standard shell script \
exec $ESPRESSO_SOURCE/Espresso $0 $*
puts "the command was: $argv0"
puts "The first argument was: [lindex $argv 0]"
puts "The arguments were : $argv"
puts "number of words was: $argc"
and espa just contained the path to the bin and
Espresso. I use this path for all my runs that has
given proper values.Clearly I am not getting a proper
reading for $argv.
Any suggestions for the sake of Espresso?
Chris
--- Olaf Lenz <address@hidden> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Christopher,
>
> Christopher Jesudason wrote:
> > when I am in the tcl shell with prompt say tclsh>
> then
> > I can refer to the external variables A B C
> inside
> > the tcl script X.tcl in the statement
> > tclsh> X.tcl A B C
> > by referring to them from the &argvo, &argv and
> &argc
> > variables. But I find this is not possible in
> Espresso
> > for some reason. Is there a workaround for this,
> or is
> > there a special command for this feature?
>
> I'm sorry, I do not understand the problem.
> Are you referring to executing Espresso
> interactively, like
>
> Espresso
>
> without an argument, or are you referring to
> starting non-interactive, like
>
> Espresso X.tcl A B C
>
> In the first case, $argv is empty, in the second
> case, $argv contains
> the strings "A" "B" and "C".
> Both cases work the same in Espresso and in tclsh,
> at least here.
> Could you specify the problem?
>
> Olaf
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
> Comment: Using GnuPG with Mozilla -
> http://enigmail.mozdev.org
>
>
iD8DBQFG28ortQ3riQ3oo/oRAkbDAJ9rHijirVYDAVeg3fKccJ9Sa+jPiwCgtbWq
> 7aYuwDmr6O5zScO6bIdQ3Xk=
> =G+sC
> -----END PGP SIGNATURE-----
>
____________________________________________________________________________________Ready
for the edge of your seat?
Check out tonight's top picks on Yahoo! TV.
http://tv.yahoo.com/