On 25/04/2008, michael <[EMAIL PROTECTED]> wrote:
>
>
> while [[ `grep -e ${STRING} ${FILE} |wc -l` -lt 1 ]];do


  This should fix it:
while [[ `grep -e "${STRING}" "${FILE}" |wc -l` -lt 1 ]];do

  The shell still replaces variable within "" quotes, but not within ''.
  e.g. this:
$ TEST="Testing 1 2 3"
$ echo "Single: " '${TEST}'
$ echo "Double: " "${TEST}"
  Returns this:
Single:  ${TEST}
Double:  Testing 1 2 3

  Or in a script like your case:
$ cat tmp.sh
#!/bin/sh
grep -e "$1" "$2"

  Running this:
$ echo "1 2 3 4 5" > tmp.txt
$ ./tmp.sh "1 2 3" tmp.txt
  Returns the line.

cheers,
Owen.

    echo nope
>     sleep 60
> done
>
>
>
>
> --
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact
> [EMAIL PROTECTED]
>
>

Reply via email to