I have an AWK script that prompts the user for a word or phrase in a text file that includes the U.S. Constitution. The awk script can find and print each individual line that ontains the word or phrase. But I also need to print the entire paragraph...which is what I am having problems with.
this works for printing one line:
awk --assignIGNORECASE=1 '{if(/'"$words"'/&&/^Clause/){print $0}' usconst.txt
The paragraph must begin with the word "Clause"
How do I print the entire paragraph?
Kenny
this works for printing one line:
awk --assignIGNORECASE=1 '{if(/'"$words"'/&&/^Clause/){print $0}' usconst.txt
The paragraph must begin with the word "Clause"
How do I print the entire paragraph?
Kenny