Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][tlug] Adding text to the beginning of a file
- Date: Fri, 16 Mar 2007 19:02:45 +0900
- From: Dave M G <martin@example.com>
- Subject: [tlug] Adding text to the beginning of a file
- User-agent: Thunderbird 1.5.0.10 (X11/20070306)
TLUG,
I'm writing a bash shell which will write today's date and some other info at the top of a bunch of PHP files.
I believe that ordinarily, the command "cat" is used for this. However, unless I'm mistaken, "cat" will always add text to the beginning of the file.
What I'll need to do is to over write some text up to a particular point.
So, if at the top of my PHP file it says:
# File modified 2007 03 16 # by Dave M G # --
Can I wipe out everything up to and including the "--" and then past in new text?
-- Dave M G Ubuntu 6.10 Edgy Eft Kernel 2.6.20-5-generic Pentium D Dual Core Processor PHP 5, MySQL 5, Apache 2
- Follow-Ups:
- Re: [tlug] Adding text to the beginning of a file
- From: Arwyn Hainsworth
- Re: [tlug] Adding text to the beginning of a file
- From: Nguyen Vu Hung
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Excluding a directory with ncftpput
- Next by Date: Re: [tlug] Adding text to the beginning of a file
- Previous by thread: Re: [tlug] System-wide MRU applet?
- Next by thread: Re: [tlug] Adding text to the beginning of a file
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links