I have a loop set up like the following#!/bin/bashcat $1|while read line;do    wget --limit-rate=50k http://url/$line.json -O got-$line;    if [ $? -ne 0 ]; then        rm got-$line;    fi    sleep 4;doneBut when i call it ./script inputfile.txtI get the following errorrm: cannot remove `got-inputfile.txt': No such file or directory--2012-12-30 12:18:06--  (start of wget output and everything works normal)Like the loop is running before there is any inputAny suggestions ?
Bash While loops
bash;wget