<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif;color:#000000">While splitting it in two might work, you are relying upon variables such as $ELPAROOT only being a certain length, so there is the possibility that it might still break. A code such as (schematically)</div><div class="gmail_default" style="font-family:verdana,sans-serif;color:#000000"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;color:#000000">cp Makefile.orig Makefile.tmp1</div><div class="gmail_default" style="font-family:verdana,sans-serif;color:#000000">for i in FOPT FPOPT ...</div><div class="gmail_default" style="font-family:verdana,sans-serif;color:#000000">do</div><div class="gmail_default" style="font-family:verdana,sans-serif;color:#000000">A=_${i}_</div><div class="gmail_default" style="font-family:verdana,sans-serif;color:#000000">B=\$I</div><div class="gmail_default" style="font-family:verdana,sans-serif;color:#000000">sed s/$A/$B/ Makefile.tmp1 > Makefile.tmp2</div><div class="gmail_default" style="font-family:verdana,sans-serif;color:#000000">mv Makefile.tmp2 Makefile.tmp1</div><div class="gmail_default" style="font-family:verdana,sans-serif;color:#000000">done</div><div class="gmail_default" style="font-family:verdana,sans-serif;color:#000000">cp Makefile.tmp1 Makefile</div><div class="gmail_default" style="font-family:verdana,sans-serif;color:#000000"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif;color:#000000">should be safe in 99.9999999% of cases. (I almost certainly did not construct A & B right, but hopefully the general idea is clear.) There are other ways to do this via a loop, or even a small fortran code.</div><div class="gmail_default" style="font-family:verdana,sans-serif;color:#000000"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 14, 2019 at 9:47 AM Gavin Abo <<a href="mailto:gsabo@crimson.ua.edu">gsabo@crimson.ua.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">FYI, it looks like the string cannot go much longer than from "sed -e <br>
"s^_FOPT_^$FOPT^" < Makefile.orig" to "sed -e "s^_ELPA_LIB_^$ELPA_LIB^"".<br>
<br>
If you can split the string in half over two alias, then that would <br>
likely allow csh to work on Ubuntu 18.04.2 just fine:<br>
<br>
username@computername:~/Desktop/test$ lsb_release -a<br>
No LSB modules are available.<br>
Distributor ID: Ubuntu<br>
Description: Ubuntu 18.04.2 LTS<br>
Release: 18.04<br>
Codename: bionic<br>
username@computername:~/Desktop/test$ dpkg -l csh<br>
Desired=Unknown/Install/Remove/Purge/Hold<br>
| <br>
Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend<br>
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)<br>
||/ Name Version Architecture Description<br>
+++-==============-============-============-=================================<br>
ii csh 20110502-3 amd64 Shell with C-like syntax<br>
<br>
username@computername:~/Desktop/test$ cat test<br>
#!/bin/csh -f<br>
alias update_makefiles 'sed -e "s^_FOPT_^$FOPT^" < Makefile.orig |\\<br>
sed -e "s^_FOPT_^$FOPT^" |\\<br>
sed -e "s^_FPOPT_^$FPOPT^" |\\<br>
sed -e "s^_OMP_SWITCH_^$OMP_SWITCH^" |\\<br>
sed -e "s^_LDFLAGS_^$LDFLAGS^" |\\<br>
sed -e "s^_DPARALLEL_^$DPARALLEL^" |\\<br>
sed -e "s^_R_LIBS_^$R_LIBS^" |\\<br>
sed -e "s^_RP_LIBS_^$RP_LIBS^" |\\<br>
sed -e "s^_SCALAPACKROOT_^$SCALAPACKROOT^" |\\<br>
sed -e "s^_SCALAPACK_LIBNAME_^$SCALAPACK_LIBNAME^" |\\<br>
sed -e "s^_BLACSROOT_^$BLACSROOT^" |\\<br>
sed -e "s^_BLACS_LIBNAME_^$BLACS_LIBNAME^" |\\<br>
sed -e "s^_MKL_TARGET_ARCH_^$MKL_TARGET_ARCH^" |\\<br>
sed -e "s^_LIBXCROOT_^$LIBXCROOT^" |\\<br>
sed -e "s^_LIBXC_LIBNAME_^$LIBXC_LIBNAME^" |\\<br>
sed -e "s^_LIBXC_LIBDNAME_^$LIBXC_LIBDNAME^" |\\<br>
sed -e "s^_LIBXC_FORTRAN_^$LIBXC_FORTRAN^" |\\<br>
sed -e "s^_FFTW_VERSION_^$FFTW_VERSION^" |\\<br>
sed -e "s^_FFTWROOT_^$FFTWROOT^" |\\<br>
sed -e "s^_FFTW_LIB_^$FFTW_LIB^" |\\<br>
sed -e "s^_FFTW_LIBNAME_^$FFTW_LIBNAME^" |\\<br>
sed -e "s^_ELPAROOT_^$ELPAROOT^" |\\<br>
sed -e "s^_ELPA_VERSION_^$ELPA_VERSION^" |\\<br>
sed -e "s^_ELPA_LIB_^$ELPA_LIB^" |\\<br>
sed -e "s^_ELPA_LIBNAME_^$ELPA_LIBNAME^" |\\<br>
sed -e "s^_FC_^$f77^" |\\<br>
sed -e "s^_MPF_^$MPF^" |\\<br>
sed -e "s^_CC_^$c77^"> Makefile'<br>
username@computername:~/Desktop/test$ ./test<br>
Word too long.<br>
<br>
username@computername:~/Desktop/test$ cat test<br>
#!/bin/csh -f<br>
alias update_makefiles 'sed -e "s^_FOPT_^$FOPT^" < Makefile.orig |\\<br>
sed -e "s^_FOPT_^$FOPT^" |\\<br>
sed -e "s^_FPOPT_^$FPOPT^" |\\<br>
sed -e "s^_OMP_SWITCH_^$OMP_SWITCH^" |\\<br>
sed -e "s^_LDFLAGS_^$LDFLAGS^" |\\<br>
sed -e "s^_DPARALLEL_^$DPARALLEL^" |\\<br>
sed -e "s^_R_LIBS_^$R_LIBS^" |\\<br>
sed -e "s^_RP_LIBS_^$RP_LIBS^" |\\<br>
sed -e "s^_SCALAPACKROOT_^$SCALAPACKROOT^" |\\<br>
sed -e "s^_SCALAPACK_LIBNAME_^$SCALAPACK_LIBNAME^" |\\<br>
sed -e "s^_BLACSROOT_^$BLACSROOT^" |\\<br>
sed -e "s^_BLACS_LIBNAME_^$BLACS_LIBNAME^" |\\<br>
sed -e "s^_MKL_TARGET_ARCH_^$MKL_TARGET_ARCH^" |\\<br>
sed -e "s^_LIBXCROOT_^$LIBXCROOT^" |\\<br>
sed -e "s^_LIBXC_LIBNAME_^$LIBXC_LIBNAME^" |\\<br>
sed -e "s^_LIBXC_LIBDNAME_^$LIBXC_LIBDNAME^" |\\<br>
sed -e "s^_LIBXC_FORTRAN_^$LIBXC_FORTRAN^" |\\<br>
sed -e "s^_FFTW_VERSION_^$FFTW_VERSION^" |\\<br>
sed -e "s^_FFTWROOT_^$FFTWROOT^" |\\<br>
sed -e "s^_FFTW_LIB_^$FFTW_LIB^" |\\<br>
sed -e "s^_FFTW_LIBNAME_^$FFTW_LIBNAME^" |\\<br>
sed -e "s^_ELPAROOT_^$ELPAROOT^" |\\<br>
sed -e "s^_ELPA_VERSION_^$ELPA_VERSION^" |\\<br>
sed -e "s^_ELPA_LIB_^$ELPA_LIB^"'<br>
<br>
alias update_makefiles1 'sed -e "s^_ELPA_LIBNAME_^$ELPA_LIBNAME^" |\\<br>
sed -e "s^_FC_^$f77^" |\\<br>
sed -e "s^_MPF_^$MPF^" |\\<br>
sed -e "s^_CC_^$c77^"> Makefile'<br>
username@computername:~/Desktop/test$ ./test<br>
<br>
_______________________________________________<br>
Wien mailing list<br>
<a href="mailto:Wien@zeus.theochem.tuwien.ac.at" target="_blank">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=DwIGaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=U_T4PL6jwANfAy4rnxTj8IUxm818jnvqKFdqWLwmqg0&m=SMPuExcKLCCqO98BW74LTAZmg0qDEm7uoKu9TJE_BuI&s=V6selw5shY-E3xWN0Aw2xw42toDEtw3wmeoACFCkPnc&e=" rel="noreferrer" target="_blank">https://urldefense.proofpoint.com/v2/url?u=http-3A__zeus.theochem.tuwien.ac.at_mailman_listinfo_wien&d=DwIGaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=U_T4PL6jwANfAy4rnxTj8IUxm818jnvqKFdqWLwmqg0&m=SMPuExcKLCCqO98BW74LTAZmg0qDEm7uoKu9TJE_BuI&s=V6selw5shY-E3xWN0Aw2xw42toDEtw3wmeoACFCkPnc&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=DwIGaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=U_T4PL6jwANfAy4rnxTj8IUxm818jnvqKFdqWLwmqg0&m=SMPuExcKLCCqO98BW74LTAZmg0qDEm7uoKu9TJE_BuI&s=RKJ2N4Pbo5KQ1suX2WuITrfLZMh2ZyDQFUtqNX6olU0&e=" rel="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=DwIGaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=U_T4PL6jwANfAy4rnxTj8IUxm818jnvqKFdqWLwmqg0&m=SMPuExcKLCCqO98BW74LTAZmg0qDEm7uoKu9TJE_BuI&s=RKJ2N4Pbo5KQ1suX2WuITrfLZMh2ZyDQFUtqNX6olU0&e=</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr">Professor Laurence Marks<br>Department of Materials Science and Engineering<br>Northwestern University<br><a href="http://www.numis.northwestern.edu/" target="_blank">www.numis.northwestern.edu</a><div>Corrosion in 4D: <a href="http://www.numis.northwestern.edu/MURI" target="_blank">www.numis.northwestern.edu/MURI</a><br>Co-Editor, Acta Cryst A<br>"Research is to see what everybody else has seen, and to think what nobody else has thought"<br>Albert Szent-Gyorgi</div></div></div>