Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Jan 30th, 2008, 8:48 AM   #1
starbeam
Newbie
 
Join Date: Jan 2008
Posts: 10
Rep Power: 0 starbeam is on a distinguished road
wunix tail in windows

I am not sure what I need to do for this. I am trying to write a program that uses the tail command from Unix in windows. I am trying to get it to go to the bottom of the file and then print out however many lines that the user puts in from the bottom. I have got it where it opens a text file and I can get it to go to the bottom of the file using
fseek(fp, 0L, SEEK_END);
but I dont know how to get it to go back to the start of that line and print it out and then keep going back until it gets to the number of lines that the user wanted printed. I know that a loop will have to be used. I was thinking a for loop but I just dont know how to get my program the go back to the start of that line once I get it to go to the bottom of the text file.
starbeam is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows Installer Service Problems Mjordan2nd Coder's Corner Lounge 2 Jan 25th, 2008 2:01 PM
Windows XP Activation Loop... Ghost Coder's Corner Lounge 3 Jan 24th, 2008 3:28 PM
Linked list insertion at the tail elford Java 9 Jan 7th, 2006 9:04 AM
Windows Vista, well sort of coldDeath Coder's Corner Lounge 21 Sep 6th, 2005 1:00 PM
Net Group /ADD (on a windows box, non domain controller) Infinite Recursion Other Programming Languages 1 Apr 13th, 2005 2:27 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 11:17 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC