I have a text file with various entries in it. Each entry is ended with line containing all asterisks.
I\'d like to use shell commands to parse this file and assign each
depending on what you want to do with the variables
awk '
f && /\*/{print "variable:"s;f=0}
/\*/{ f=1 ;s="";next}
f{
s=s" "$0
}' file
output:
# ./test.sh
variable: Field1
variable: Lorem ipsum Data to match
variable: More data Still more data
the above just prints them out. if you want, store in array for later use...eg array[++d]=s