<div dir="auto">I strongly suggest the loop. In general use, the length of some of the variables could be too large even for tcsh. I don't think it is robust to assume that, for instance, $ELPA is /opt/elpa when it could be a 200+ character long "Some Disk"/"Some Partition"/"Some UserName"/elpa etc. (Let's assume no DOS with spaces in names.)<br><br><div data-smartmail="gmail_signature">_____<br>Professor Laurence Marks<br>"Research is to see what everybody else has seen, and to think what nobody else has thought", Albert Szent-Gyorgi<br><a href="http://www.numis.northwestern.edu">www.numis.northwestern.edu</a></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jun 16, 2019, 14:45 Gavin Abo <<a href="mailto:gsabo@crimson.ua.edu">gsabo@crimson.ua.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <p>The sed works fine and is not a problem.  The only problem with
      the script is with: alias update_makefiles 'string'<br>
    </p>
    <p>It's just that the string part is too long for csh [
<a class="m_1906682621531841021moz-txt-link-freetext" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__www.mail-2Darchive.com_wien-40zeus.theochem.tuwien.ac.at_msg16028.html&d=DwMDaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=U_T4PL6jwANfAy4rnxTj8IUxm818jnvqKFdqWLwmqg0&m=nFbd09RFh4cBjsVp8OnKpBBC6Sj90JhsMXuR_U8ZCyU&s=WTSDiGuUygWiGRThJYSzNLMFqq08pcrH39xw6VyTlw0&e=" target="_blank" rel="noreferrer">https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg16028.html</a>
      ].<br>
    </p>
    <p>Which is why if you shorten the string, for example split it into
      two alias (like update_makefiles01 and update_makefiles02), then
      the script works fine:<br>
    </p>
    <p><a class="m_1906682621531841021moz-txt-link-freetext" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__www.mail-2Darchive.com_wien-40zeus.theochem.tuwien.ac.at_msg18738.html&d=DwMDaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=U_T4PL6jwANfAy4rnxTj8IUxm818jnvqKFdqWLwmqg0&m=nFbd09RFh4cBjsVp8OnKpBBC6Sj90JhsMXuR_U8ZCyU&s=1PTPDkxObDMGdd4CoZOX8arwbGxGhDxyvBXqCfdPod4&e=" target="_blank" rel="noreferrer">https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg18738.html</a></p>
    <p><a class="m_1906682621531841021moz-txt-link-freetext" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__www.mail-2Darchive.com_wien-40zeus.theochem.tuwien.ac.at_msg18731.html&d=DwMDaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=U_T4PL6jwANfAy4rnxTj8IUxm818jnvqKFdqWLwmqg0&m=nFbd09RFh4cBjsVp8OnKpBBC6Sj90JhsMXuR_U8ZCyU&s=wT5w05MEC0f9j3eWhmyKFxXeEDJMAKyjx9Yw_IUvI2g&e=" target="_blank" rel="noreferrer">https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg18731.html</a></p>
    <p>Note: The for loop pseudo code in msg18738 I realize I have a
      mistake were multiple substitutions likely would have to be worked
      out too [
<a class="m_1906682621531841021moz-txt-link-freetext" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__unix.stackexchange.com_questions_68042_double-2Dand-2Dtriple-2Dsubstitution-2Din-2Dbash-2Dand-2Dzsh&d=DwMDaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=U_T4PL6jwANfAy4rnxTj8IUxm818jnvqKFdqWLwmqg0&m=nFbd09RFh4cBjsVp8OnKpBBC6Sj90JhsMXuR_U8ZCyU&s=RmPEyiD0HNjONfo-94jenjNpOdTxtm1xBtERTlx93Ns&e=" target="_blank" rel="noreferrer">https://unix.stackexchange.com/questions/68042/double-and-triple-substitution-in-bash-and-zsh</a>
      ].<br>
    </p>
    <p>Or tcsh could be used that has a larger maximum length for the
      string:</p>
    <p><a class="m_1906682621531841021moz-txt-link-freetext" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__www.mail-2Darchive.com_wien-40zeus.theochem.tuwien.ac.at_msg18730.html&d=DwMDaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=U_T4PL6jwANfAy4rnxTj8IUxm818jnvqKFdqWLwmqg0&m=nFbd09RFh4cBjsVp8OnKpBBC6Sj90JhsMXuR_U8ZCyU&s=x9bj7ohdmZQ0AapEazk3GnvUEV3hL3s_ihcdBEOkYrU&e=" target="_blank" rel="noreferrer">https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg18730.html</a><br>
    </p>
    <p><br>
    </p>
    <div class="m_1906682621531841021moz-cite-prefix">On 6/16/2019 2:52 AM, pboulet wrote:<br>
    </div>
    <blockquote type="cite">
      
      Hello all,
      <div><br>
      </div>
      <div>If I understand correctly, sed is the main problem.
        So, isn’t there an alternative to sed? (e.g. awk, perl,
        python,…).</div>
      <div><br>
      </div>
      <div>Best regards,</div>
      <div>Pascal</div>
      <div><br>
      </div>
      <div><br>
      </div>
      <div><br>
        <div>
          <div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;line-break:after-white-space">
            <div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;line-break:after-white-space">
              <div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;line-break:after-white-space">
                <div dir="auto" style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;word-wrap:break-word;line-break:after-white-space">
                  <div dir="auto" style="text-align:start;text-indent:0px;word-wrap:break-word;line-break:after-white-space">
                    <div style="color:rgb(0,0,0);letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><span style="font-size:16pt;font-family:Mistral">Pascal
                        Boulet</span></div>
                    <div style="color:rgb(0,0,0);letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><font face="Lucida Handwriting"><span style="font-size:21px">—</span></font></div>
                    <div style="color:rgb(0,0,0);letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><em style="color:rgb(34,187,234);font-family:verdana;font-size:11px;line-height:22px">Professor
                        in computational chemistry - DEPARTMENT OF
                        CHEMISTRY</em></div>
                    <div>
                      <div style="color:rgb(0,0,0);letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-family:Tahoma,Verdana,Arial,Helvetica,sans-serif;font-size:15px;line-height:22px"><span style="font-size:11px;font-family:verdana">Aix-Marseille University </span><span style="font-size:11px;font-family:verdana">- Avenue Escadrille Normandie Niemen
                          - F-13013 Marseille - FRANCE</span></div>
                      <div style="color:rgb(0,0,0);letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none;font-family:Tahoma,Verdana,Arial,Helvetica,sans-serif;font-size:15px;line-height:22px"><span style="font-size:11px;font-family:verdana">Tél: +33(0)4 13 55 18 10 - Fax :
                          +33(0)4 13 55 18 50</span></div>
                      <div style="color:rgb(0,0,0);letter-spacing:normal;text-transform:none;white-space:normal;word-spacing:0px;text-decoration:none"><font face="verdana"><span style="font-size:12px;line-height:22px">Email : </span></font><font face="verdana" color="#22bbea"><span style="font-size:12px;line-height:20px"><a href="mailto:pascal.boulet@univ-amu.fr" target="_blank" rel="noreferrer">pascal.boulet@univ-amu.fr</a></span></font></div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br>
    <blockquote type="cite">
    </blockquote>
  </div>

_______________________________________________<br>
Wien mailing list<br>
<a href="mailto:Wien@zeus.theochem.tuwien.ac.at" target="_blank" rel="noreferrer">Wien@zeus.theochem.tuwien.ac.at</a><br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__zeus.theochem.tuwien.ac.at_mailman_listinfo_wien&d=DwICAg&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=U_T4PL6jwANfAy4rnxTj8IUxm818jnvqKFdqWLwmqg0&m=nFbd09RFh4cBjsVp8OnKpBBC6Sj90JhsMXuR_U8ZCyU&s=SCKqSH2Wl7gOqMMaGbqW-bTTRbZI8iq_Dhd96gkoZK0&e=" rel="noreferrer noreferrer" target="_blank">https://urldefense.proofpoint.com/v2/url?u=http-3A__zeus.theochem.tuwien.ac.at_mailman_listinfo_wien&d=DwICAg&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=U_T4PL6jwANfAy4rnxTj8IUxm818jnvqKFdqWLwmqg0&m=nFbd09RFh4cBjsVp8OnKpBBC6Sj90JhsMXuR_U8ZCyU&s=SCKqSH2Wl7gOqMMaGbqW-bTTRbZI8iq_Dhd96gkoZK0&e=</a><br>
SEARCH the MAILING-LIST at:  <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mail-2Darchive.com_wien-40zeus.theochem.tuwien.ac.at_index.html&d=DwICAg&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=U_T4PL6jwANfAy4rnxTj8IUxm818jnvqKFdqWLwmqg0&m=nFbd09RFh4cBjsVp8OnKpBBC6Sj90JhsMXuR_U8ZCyU&s=TscmYOmYOc8SSvKcz2lWDYc5T6YzihvHFV6hO2WwWFM&e=" rel="noreferrer noreferrer" target="_blank">https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mail-2Darchive.com_wien-40zeus.theochem.tuwien.ac.at_index.html&d=DwICAg&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=U_T4PL6jwANfAy4rnxTj8IUxm818jnvqKFdqWLwmqg0&m=nFbd09RFh4cBjsVp8OnKpBBC6Sj90JhsMXuR_U8ZCyU&s=TscmYOmYOc8SSvKcz2lWDYc5T6YzihvHFV6hO2WwWFM&e=</a><br>
</blockquote></div>