Karakas Online

4.10. Run sed and awk scripts

Copy the following files in your working directory:

Copy runsed somewhere like /usr/local/bin. lyxtox and runsed should be executable.

runsed is a simple script that I modified from the original runsed script found in O'Reilly's Unix Power Tools, Chapter 34, Section 3 “Testing and Using a sed Script: checksed, runsed”. It simply takes two filenames as an argument and then runs sed on the second file using the first file as a sed script:

runsed sedscript file

A sed script is a script that tells sed what to do. sed, in turn, is a powerful line editor suitable for batch processing (see Section 3.8). You don't have to worry about runsed, sedscr and lyxtox. You may want to have a look at lyxtox, just to ensure that all paths are correctly set and that you get some idea of what it does. It is very well commented. The gory details are in Section 7.1.

Last updated Mon Sep 24 01:19:25 CEST 2007 Permalink: http://www.karakas-online.de/mySGML/run-sed-awk-scripts.html All contents © 2002-2007 Chris Karakas