By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,509 Members | 1,194 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,509 IT Pros & Developers. It's quick & easy.

implementing tail command

P: n/a
lak
i want to write a program that implement tail and tail -f command in
unix.
can any one help me in this?

Sep 24 '07 #1
Share this Question
Share on Google+
6 Replies


P: n/a
On Sep 24, 8:56 am, lak <lakindi...@gmail.comwrote:
i want to write a program that implement tail and tail -f command in
unix.
can any one help me in this?
You might want to (re)read the comp.lang.c thread from last week that
asked this very question.

Lew

Sep 24 '07 #2

P: n/a
lak wrote:
i want to write a program that implement tail and tail -f command in
unix.
can any one help me in this?
You could read the thread on this subject from last week, as Lew has
suggested.

You could more relevantly ask the question in comp.unix.programmer
(checking the FAQ and the archives - using Google Groups - before
posting your question would be a good thing).
Sep 24 '07 #3

P: n/a
lak wrote:
>
i want to write a program that implement tail and tail -f command
in unix. can any one help me in this?
Yes. At the prompt, type "tail <filename>" (or "tail -f
<filename>"). "which tail" and "man tail" may also be of
interest. This is off-topic in c.l.c.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>

--
Posted via a free Usenet account from http://www.teranews.com

Sep 25 '07 #4

P: n/a
CBFalconer <cb********@yahoo.comwrites:
lak wrote:
>i want to write a program that implement tail and tail -f command
in unix. can any one help me in this?

Yes. At the prompt, type "tail <filename>" (or "tail -f
<filename>"). "which tail" and "man tail" may also be of
interest. This is off-topic in c.l.c.
Oh, come on. Since he posted in comp.lang.c, we can assume he wants
to write a C program.

Implementing "tail" in standard C is a fairly interesting problem.
"tail -f" can't be reasonably implemented in purely standard C.

The real problem, of course, is that we discussed this at some length
just a few days ago.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <* <http://users.sdsc.edu/~kst>
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
Sep 25 '07 #5

P: n/a
CBFalconer <cb********@yahoo.comwrites:
lak wrote:
>>
i want to write a program that implement tail and tail -f command
in unix. can any one help me in this?

Yes. At the prompt, type "tail <filename>" (or "tail -f
<filename>"). "which tail" and "man tail" may also be of
interest. This is off-topic in c.l.c.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>
No. Using Unix like shell commands are off topic here. Since he is in a
C group I guess it's fairly obvious that he is looking for some C
guidance.

This was discussed just a short while back as you probably well know.

http://groups.google.ca/group/comp.l...1637b?lnk=raot

or

http://tinyurl.com/3xspy5

Your multiple signatures are still disrupting auto-snipping FYI.

Sep 25 '07 #6

P: n/a
lak wrote:
i want to write a program that implement tail and tail -f command in
unix.
can any one help me in this?
Something useful for beginners:
http://c.snippets.org/

Download the zip archive, there are all sort of small programs,
like calc, head, tail, grep etcetera.
Beware tough, a lot of them were written for a DOS environment.
Sep 25 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.