#!/bin/sh for file in r*.txt ; do cat $file | sed "/l/s//p/g" | more ; done exit