in reply to I try to write script which try to open a text file and read first line from it
What have you tried so far? Have you written any code? If so, how far did you get? Where did you get stuck? If you weren't able to write any code what so ever, what manual pages have you read? Which part didn't you understand?