I read the help read page, but still don’t quite make sense. Don’t know which option to use.
How can I read N lines at a time using Bash?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is harder than it looks. The problem is how to keep the file handle.
The solution is to create another, new file handle which works like
stdin(file handle 0) but is independent and then read from that as you need.