Advertisement

Editing Files in Place

Abstract

Sometimes you want to modify a file as part of the tasks run from a shell script. Although the use of sed to modify files on the fly is common, the use of ed is less familiar to many. ed is a line-oriented editor that works much like any other text editor. It opens a file, makes modifications, saves the changes, and exits. The advantage of using ed to script these interactive sessions is that the modification is performed directly on the file itself and the results are neither redirected to another file nor used to overwrite the file itself.

Keywords

Search String Interactive Session Text Editor Original File Shell Script 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Ron Peters 2009

Personalised recommendations