diff --git a/sheets/awk b/sheets/awk index 72ab572..1a87950 100644 --- a/sheets/awk +++ b/sheets/awk @@ -47,8 +47,13 @@ awk -v RS='' ' printf '1 2 3' | awk 'BEGIN {OFS=":"}; {print $1,$2,$3}' # Search paragraph for the given REGEX match. +# Paragraphs will be collapsed together. awk -v RS='' '/42B/' file +# Search paragraph for the given REGEX match. +# Paragraphs will be separated with a new line. +awk -v RS= ORS='\n\n' '/42B/' file + # Display only first field in text taken from STDIN. echo 'Field_1 Field_2 Field_3' | awk '{print $1}' # Note that in this case, you're far better off using cut(1).