Hi.
I think that
grep will not cross newlines, so that you would need to place your commands each on a single line. There is a note in my man grep page about using
perl regular expressions, but that it is undocumented. The
awk and
perl scripts can make use of settable record boundaries.
Here's a
perl quickie:
Code:
#!/bin/sh
# @(#) s1 Demonstrate perl quickie for unmatched string across lines.
FILE=${1-data1}
perl -wn -e 'BEGIN{$/=";"} print if not /tablespace/' $FILE
exit 0