How can I read only X lines from a a.txt file?
The file contains all the names of a directory, I would like to read only x lines.
X can be a number that can varies from 1 to 99
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.
You’ll need to modify this based on your needs, but the script below will loop through the file ‘directories.txt’, and ECHO the contents of the line until you hit the maximum number of lines set in
maxlines.