Federico Bruni <f...@inventati.org> writes:

> #!/bin/bash
> LIST="$(grep -oh -e @ref{.*} *.itely | sort -u)"
> for i in $LIST; do

This splits $LIST at separators contained in the shell variable IFS .
One can temporarily override it to just split on newlines, but it is
more straightforward to write

grep -oh -e @ref{.*} *.itely | sort -u |
while read i; do

rather than tamper with shell syntax temporarily.

>    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
>
> You'll get something like:
>
> @ref{Tuplets}
> @ref{Turkish
> classical
> music}
> @ref{Typesetting
> Gregorian
> chant}
>
>
> The problem is the space character, which is not matched in the bash
> script.
> Why?
>
> Thanks in advance
> Federico
>

-- 
David Kastrup

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to