<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>shell script variable substitution and dplace</title>
  <link rel="alternate" href="https://conferences.xsede.org/c/message_boards/find_recent_posts?p_l_id=" />
  <subtitle>shell script variable substitution and dplace</subtitle>
  <entry>
    <title>shell script variable substitution and dplace</title>
    <link rel="alternate" href="https://conferences.xsede.org/c/message_boards/find_message?p_l_id=&amp;messageId=351666" />
    <author>
      <name>Donald Nathan Krieger</name>
    </author>
    <id>https://conferences.xsede.org/c/message_boards/find_message?p_l_id=&amp;messageId=351666</id>
    <updated>2012-07-04T17:48:05Z</updated>
    <published>2012-07-04T17:48:05Z</published>
    <summary type="html">Hi,&lt;br /&gt;&lt;br /&gt;I&amp;#039;ve just introduced dplace into my batch job, a tcsh script, and am seeing a problem.  Here is the fragment of the script which spawns a veePSC instance.  Note that veePSC reads from the standard input and sends its standard output to the null device:&lt;br /&gt;        dplace -n veePSC -c -d ${iCPU}  ./veePSC &amp;lt; ${Subject}_${Session}/P/${LOC}_${j}.pro &amp;gt;&amp;amp; /dev/null &amp;amp;&lt;br /&gt;and here is the corresponding output to the .o file:&lt;br /&gt;[1] 3759321&lt;br /&gt;[1]    Exit 1                       &lt;br /&gt;  dplace -n veePSC -c -d 6./veePSC &amp;lt; ${Subject}_${Session}/P/${LOC}_${j}.pro &amp;gt;&amp;amp;  ...&lt;br /&gt;&lt;br /&gt;Notice that variable iCPU is expanded to &amp;#034;6&amp;#034; but the other variables are not expanded, i.e. Subject, Session, LOC, and j.  So this instance of veePSC fails to find its input file.  An earlier version of this batch script uses this more complex command without error on Blacklight at the Pittsburgh Supercomputing Center:&lt;br /&gt;  echo &amp;#034;pf; ${Subject}_${Session}/P/${LOC}_${j}.pro; ex;&amp;#034; | tr &amp;#034;;&amp;#034; &amp;#034;\n&amp;#034; | tr -d &amp;#034; &amp;#034; | ./veePSC &amp;gt;&amp;amp; /dev/null &amp;amp;&lt;br /&gt;&lt;br /&gt;I&amp;#039;ve attached the script.  You can find the code at line #211 .&lt;br /&gt;&lt;br /&gt;Your thoughts would be welcome.&lt;br /&gt;&lt;br /&gt;Don&lt;br /&gt; &lt;br /&gt;Don Krieger, Ph.D.&lt;br /&gt;Department of Neurological Surgery&lt;br /&gt;University of Pittsburgh</summary>
    <dc:creator>Donald Nathan Krieger</dc:creator>
    <dc:date>2012-07-04T17:48:05Z</dc:date>
  </entry>
</feed>

