|
From: | Ulf Schiller |
Subject: | [ESPResSo] Re: using external arguments in a tcl script |
Date: | Tue, 04 Sep 2007 12:44:36 +0200 |
User-agent: | Internet Messaging Program (IMP) H3 (4.1.3) |
-------- Original Message -------- Subject: Re: [ESPResSo] RE: using external arguments in a tcl script Date: Mon, 3 Sep 2007 09:28:29 -0700 (PDT) From: Christopher Jesudason <address@hidden> To: Olaf Lenz <address@hidden> CC: ESPResSo users' mailing list <address@hidden> Hi, The output for the input is as follows: address@hidden tests]$ ./espa argment2.tcl A B C
This passes all arguments from the commandline to ./espa. Make sure that they are passed on to ESPResSo from your script. Regards, Ulf
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?
Learn shell first.
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>thenI can refer to the external variables A B C inside the tcl script X.tcl in the statement > tclsh> X.tcl A B C > byreferring to them from the &argvo, &argv and &argcvariables. But I find this is not possible inEspressofor some reason. Is there a workaround for this,or isthere 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.orgiD8DBQFG28ortQ3riQ3oo/oRAkbDAJ9rHijirVYDAVeg3fKccJ9Sa+jPiwCgtbWq7aYuwDmr6O5zScO6bIdQ3Xk= =G+sC -----END PGP SIGNATURE-----____________________________________________________________________________________Ready for the edge of yourseat? Check out tonight's top picks on Yahoo! TV. http://tv.yahoo.com/ _______________________________________________ ESPResSo mailing list address@hidden https://fias.uni-frankfurt.de/mailman/listinfo/espresso This email was Anti Virus checked by Astaro Security Gateway. http://www.astaro.com -- Christoph Junghans Max Planck Institute for Polymer Research Theory Group POBox 3148 D 55021 Mainz, Germany Phone: +49 6131 379 335 Web: http://www.mpip-mainz.mpg.de/~junghans
[Prev in Thread] | Current Thread | [Next in Thread] |