RESCOMP Archives

December 2006

RESCOMP@LISTSERV.MIAMIOH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
"Martin Henry H. Stevens" <[log in to unmask]>
Reply To:
Research Computing Support <[log in to unmask]>, Martin Henry H. Stevens
Date:
Thu, 28 Dec 2006 06:47:02 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (46 lines)
Hi folks,
I need to do some simple repetitive manipulation of a bunch of text  
files: I want to find and replace the exact same strings in several  
files.

Could someone write me a small sample program with instructions for  
how to implement it?
'
For instance, I want to find "\begin{Schunk}" and replace it with  
"\begin{verbatim}" and also find "\end{Schunk}" and replace it with  
"\end{Schunk}," and a few other strings as well.

I would also like to delete the first n lines, from line 1, through  
and including the line containing "\begin{document}" (the number of  
lines will vary among files).

My text editor is Aquamacs (a native Mac emacs editor) and I am NOT  
very facile with it, outside of the tasks I do routinely (edit LaTeX,  
R, and Rnw files). I assume a small program could be written to run  
either in unix (upon which my Mac OS sits) or in emacs.

many thanks, and happy holidays,
Hank




Dr. Martin Henry H. Stevens, Assistant Professor
338 Pearson Hall
Botany Department
Miami University
Oxford, OH 45056

Office: (513) 529-4206
Lab: (513) 529-4262
FAX: (513) 529-4243
http://www.cas.muohio.edu/~stevenmh/
http://www.muohio.edu/ecology/
http://www.muohio.edu/botany/
"E Pluribus Unum"

If you send an attachment, please try to send it in a format anyone  
can read, such as PDF, text, Open Document Format, HTML, or RTF.  
Please try not to send me MS Word or PowerPoint attachments-
Why? See:  http://www.gnu.org/philosophy/no-word-attachments.html

ATOM RSS1 RSS2