Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
07-16-2001, 10:23 AM
|
#1
|
LQ Newbie
Registered: Jul 2001
Posts: 2
Rep:
|
Script, Reading a file, When end of file?
Hello everybody,
I am a new Linux user, I am creating a small script to read a file and count the number of lines that it has, so I do bucle read while is not the end of the file, but I do not know how to find out
when the end of the file has been reach.
Can somebody help me?
Thanks.
Elias.
|
|
|
07-16-2001, 10:30 AM
|
#2
|
Senior Member
Registered: May 2001
Location: Bristol, UK
Distribution: Slackware, Fedora, RHES
Posts: 2,243
Rep:
|
Was this just a shell scripting experiment? If so ignore this! If not, and you actually need to count the number of lines in a file how about cheers
Jamie...
|
|
|
07-16-2001, 11:01 AM
|
#3
|
LQ Newbie
Registered: Jul 2001
Posts: 2
Original Poster
Rep:
|
Yes, it is a shell scripting experiment, but is very usefull what you
told me because now I can do a bucle that stops when the last line has been read.
Thanks.
EliBM.
|
|
|
All times are GMT -5. The time now is 08:55 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|