From: Jan-Benedict Glaw <jbglaw@lug-owl.de>
To: Edward Parrilla <eparrilla@comcast.net>
Cc: linux-c-programming@vger.kernel.org
Subject: Re: Is there any function to delete lines from a text file
Date: Mon, 11 Oct 2004 07:31:34 +0200 [thread overview]
Message-ID: <20041011053133.GJ5033@lug-owl.de> (raw)
In-Reply-To: <JLEEKLMLBNBBGELJFIHPGELICIAA.eparrilla@comcast.net>
[-- Attachment #1: Type: text/plain, Size: 889 bytes --]
On Sun, 2004-10-10 17:55:00 -0500, Edward Parrilla <eparrilla@comcast.net>
wrote in message <JLEEKLMLBNBBGELJFIHPGELICIAA.eparrilla@comcast.net>:
> Hi there,
> I know that fputs(), or fgets() can store or get a line from a file, is
> there a way to delete a line from a text file?
No.
The only way to do that is to copy the whole file and omitting the line
you want to omit (using the "f" functions). Alternatively, you'd use the
"normal" functions and only copy the part after the line to be deleted
some bytes towards the front...
MfG, JBG
--
Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481 _ O _
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg _ _ O
fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak! O O O
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
prev parent reply other threads:[~2004-10-11 5:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-10 11:07 -fomit-frame-pointer + -g Ricardo Catalinas Jimenez
2004-10-10 11:15 ` Jan-Benedict Glaw
2004-10-10 16:09 ` Ricardo Catalinas Jimenez
2004-10-10 22:55 ` Is there any function to delete lines from a text file Edward Parrilla
2004-10-11 5:31 ` Jan-Benedict Glaw [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20041011053133.GJ5033@lug-owl.de \
--to=jbglaw@lug-owl.de \
--cc=eparrilla@comcast.net \
--cc=linux-c-programming@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).