Should be easy but want to know why the “left arrow” < is used instead of right arrow.

   done < a.txt

What does it mean by left arrow? I thought since I am done with the condition, the output should be saved in a.txt with right arrow like done > a.txt

Why we use left arrow for if-statement?

1 Answer 1


arrows are for redirection: > redirects an output file-descriptor, < an input file-descriptor.

since you are asking a lot of questions that are all related, you really should have a look at the manpage of bash. Try:

man bash

it's available online and there' also a good documentation.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .