RE: Editor Documentation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks I'll check it out

Wolf


-----Original Message-----
From: Cameron Simpson [mailto:cs@xxxxxxxxxx] 
Sent: Friday, 21 March 2003 1:39 PM
To: psyche-list@xxxxxxxxxx
Subject: Re: Editor Documentation


On 17:57 21 Mar 2003, Wolfgang Gill <wolfgang@xxxxxxxxxxxxxxxxxxxx> wrote:
| Can anyone tell me or point me in the right direction as to where to 
| get hold of some editor documentation. Either in HTML or PDF format.
| 
| What I basically would like to do, is to write some *.sh scripts. And 
| use the editor commands to edit some text files (Command line based). 
| I want to be able to search for text, and either add text to the file 
| (in the correct area), or remove the text and/or replace the text in 
| the file using a script.
| 
| This will mainly be used for updating drivers and update pack files 
| which will also require the editing of text or *.ini files etc.
| 
| I've read some scripts which use 'ed' but I'm unable to get hold of a 
| detailed, printable document on it's commands and features. (And not 
| to mention some good examples of how they can be used in a command 
| line basis).

To use ed in command line mode you go:

	ed - filename <file-with-ed-commands
    or
	ed - filename <<'X'
		ed
		commands
		...
	X

to use a shell here-document.

| I've found some commands which will partly do what I need it to. But 
| it doesn't work 100% the way I'd like. And getting more detailed 
| information on it will help greatly.

For this kind of thing I usually use bsed:

	http://www.cskk.ezoshosting.com/cs/scripts/bsed

which is a wrapper for sed that edits in place. Example:

	bsed 's/this/that/' filename

You invoke it just just sed except that it edits files instead of acting as
a filter. The manual for sed ("man sed") describes all the commands in
detail, and sed's command set is very much like ed, so you will already be
somewhat familiar with it.

Cheers,
-- 
Cameron Simpson, DoD#743        cs@xxxxxxxxxx    http://www.zip.com.au/~cs/

Try moving off NT easily.  You can move from Solaris to HP/UX to AIX or DEC
easily-- relative to moving off of NT, which is like a Roach Motel.  Once
you check in, you never check out.
	- Scott McNealy, Sun Microsystems



-- 
Psyche-list mailing list
Psyche-list@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/psyche-list

######################################################################
Attention: 
This e-mail message is privileged and confidential. If you are not the 
intended recipient please delete the message and notify the sender. 
Any views or opinions presented are solely those of the author.

This e-mail has been scanned and cleared by MailMarshal 
www.marshalsoftware.com
######################################################################



-- 
Psyche-list mailing list
Psyche-list@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux