[ale] Off the wall vi question

Geoffrey esoteric at 3times25.net
Thu Mar 2 11:35:05 EST 2006


Chris Ricker wrote:
> On Thu, 2 Mar 2006, Geoffrey wrote:
> 
>> tom sawyer wrote:
>>> Hello all,
>>>
>>> I was just wondering, is it possible to have a *sh
>>> script call vi and then execute commands inside of vi?
>>>  Or, is it possible to load a file in vi that
>>> automatically runs commands/aliases/etc?
>> You want to use either sed or ed with a HERE doc.  ed with a HERE doc is 
>> likely to be a better solution as you edit a single file in place, where 
>> as sed is going to require input and output files, whereas the HERE doc 
>> will edit the file in place.
> 
> modern sed has a -i option to edit in place

Showing my age.  Then, I'd say go with sed.

-- 
Until later, Geoffrey

War never solved anything, well, except slavery, fascism and communism



More information about the Ale mailing list