Frederico Bruni: > Il giorno gio 20 apr 2017 alle 11:22, k...@aspodata.se ha scritto: > > Frederico Bruni: > > ... > >> Enter Documentation/it/notation and run this: > >> > >> #!/bin/bash > >> LIST="$(grep -oh -e @ref{.*} *.itely | sort -u)" > >> for i in $LIST; do > >> echo $i > >> # echo -n "Replace" $i "with the translated node: " > >> # read NODE > >> # if $NODE=""; then exit > >> # else > >> # sed "s|$i|$NODE|g" *.itely > >> # fi > >> done ... > > $ cat tt > > #!/bin/sh > > > > # for some reason mapfile doesnt work on pipes, hence the tmpfile > > grep -oh -e "@ref{.*}" *.itely | sort -u > tmpfile > > mapfile -t org < tmpfile > > > > len=${#org[@]} > > for (( ix=0; ix < $len; ix++ )) > > do > > read NODE > > printf "%4d: %s %s\n" $ix "${org[ix]}" "$NODE" > > done > > Unfortunately this script hangs forever. ...
It is expecting something from stdin. You didn't tell us where the replacement data comes from, so I guessed you run your script as cat repl.txt | your_script Regards, /Karl Hammar ----------------------------------------------------------------------- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden +46 173 140 57 _______________________________________________ lilypond-devel mailing list lilypond-devel@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-devel