From: Aks on
Hi friends,

I want to read a text from a file and on the base of that i want to do
some thing. Can anyone guid me how to do that as i am very new to unix
environment.

Any suggestion will be highly appericable.

regards,
From: Janis Papanagnou on
Aks wrote:
> Hi friends,
>
> I want to read a text from a file and on the base of that i want to do
> some thing. Can anyone guid me how to do that as i am very new to unix
> environment.

while read -r a_text
do
case ${a_text} in
choice_1) do_something_1 ;;
choice_2) do_something_2 ;;
*) handle_rest ;;
esac
done < a_file


Janis

>
> Any suggestion will be highly appericable.
>
> regards,