Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm writing a script to read a simple text file.

But I get only a "No such file" message.

The file exist and has proper access rigths

the code I'm using is:

while read linha; do
    echo $linha
done < Ficheiro
share|improve this question
you may get the same error message even after including the $ sign, if your file isnt in the same directory. You might try specifying the absolute path. – j0h May 6 '13 at 16:16

You are missing a $

done < $Ficheiro
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.