#!/bin/ksh ####################################################################### # Program Name: phrase.sh # Purpose: look for a phrase that may be split across lines # Written by: J. David Schronce # Program Directory: /usr/local/bin # Creation Date: 7/28/97 ####################################################################### # Usage: phrase.sh "phrase to find" file1 [file2 [file3]] # History: # Last Modified: # # # 1st parameter is phrase all others are filenames search=$1 shift for file do sed ' /'"$search"'/b N h s/.*\n// /'"$search"'/b g s/ *\n/ / /'"$search"'/{ b } g D' $file done