Date: Thu, 26 Oct 2006 21:38:40 -0700 From: jekillen <jekillen@prodigy.net> To: FreeBSD Mailing List <freebsd-questions@freebsd.org> Subject: altering text files. Message-ID: <574f7c8f130196ac795de5b950d3dcca@prodigy.net>
next in thread | raw e-mail | index | archive | help
Hello fellow FreeBSD users; I have a technical question about text files: Is there a way to edit a text file via a script by searching and replacing small portions of a text file, instead of having to rewrite the whole file for what may be negligible alterations? I'm assuming not, but I'm not really sure. My interest is with any scripting or even compiled language, but specifically the use of php to edit files on a web server. I have created an application for a web client that allows the client to contact their site and make changes to a file that lists event date, title, location, subject. And creates a separate file for details related to each event listing. I'm concerned about allowing the client to edit the listings and detail files in the event that a mistake is made in the data entered from a event posting form. (I don't want to have to manually edit the files for them in this event) So, the idea of correcting the spelling of a word like is when it was spelled it seems over kill (to over write a whole file just to change one character). Thanks in advance; Jeff k
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?574f7c8f130196ac795de5b950d3dcca>