From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 Date: Thu, 2 May 2013 15:22:58 +0200 Message-ID: From: Rudolf Sykora To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [9fans] problem with a here document in rc Topicbox-Message-UUID: 506747f2-ead8-11e9-9d60-3106f5b1d025 Hello, I have a problem with writing correctly a here document in rc. I wrote, say: s =3D (1 2) for(i in $s) { mkdir -p $i cp POSCAR $i @{ cd $i ed POSCAR <[2]/dev/null } } 2c $i . w q EOF and I wanted to have the 2nd line of individual POSCAR=C2=A0files replaced with the immediate value of $i. But the script doesn't do it, and I don't know if it can be modified in a simple way so that it did. (I could possibly use sed [ie. without a here document] but ...) If anyone can tell me... Thanks! Ruda