Fix bashish (automatic use of REPLY in read) in shell scripts.

Make sure backslash is not used as escape in shell reads.


git-svn-id: http://voip.null.ro/svn/yate@5927 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2014-12-16 09:39:41 +00:00
parent 0b17897104
commit 8c917c7957
4 changed files with 4 additions and 4 deletions

View File

@ -26,7 +26,7 @@ prompt=""
# put here a proper wave/play file to play before starting echoing
# prompt="share/sounds/tone.wav"
read
read -r REPLY
echo "$REPLY" | sed 's/^[^:]*:\([^:]*\):.*$/%%<message:\1:true:/;'
if [ -n "$prompt" -a -f "$prompt" ]; then

View File

@ -22,7 +22,7 @@
# Generates 2 seconds of white noise
# To test add a route to: external/play/noise.sh
read
read -r REPLY
echo "$REPLY" | sed 's/^[^:]*:\([^:]*\):.*$/%%<message:\1:true:/;'
echo "=================== noise ===================" >&2

View File

@ -22,7 +22,7 @@
# Plays sound using the "play" program (from the sox package)
# To test add a route to: external/record/play.sh
read
read -r REPLY
echo "$REPLY" | sed 's/^[^:]*:\([^:]*\):.*$/%%<message:\1:true:/;'
echo "=================== play ====================" >&2

View File

@ -51,7 +51,7 @@ echo "=============================================" >&2
$0 --generator &
echo "================= reporter ==================" >&2
while read; do
while read -r REPLY; do
echo "Reporter: $REPLY" >&2
case "$REPLY" in
%%\>message:*)