Hi, I have found \0 actually returns the whole match, but not as a variable, I think it might be close to what I wish, but not yet there:
Code:
#original
tname="$(echo "$content" | sed -n '/Content-Disposition/{ /".*"/!N}
/Content-Disposition/{ /".*"/!N}
/Content-Disposition/{ /".*"/s/\n//g;s/.*"\(.*\)"/\1/p}')"
#new
tname="$(echo "$content" | sed -n '/Content-Disposition/{ /".*"/!N}
/Content-Disposition/{ /".*"/!N}
/Content-Disposition/{ /".*"/s/\n//g;s/.*"\(.*\)"/\0/p}')"
this would actually give:
Code:
|Content-Disposition: attachment; filename="=?big5?B?QXJhc2hpILRQLUxvdHVzLnRvcnJlbnQ=?="
Content-Disposition: attachment; filename="[CASO][Freezing][01-12][GB][RV10].torrent"|
give the whole result, but I only want what's in the quotation, and I want it in arrays rather than as a whole string.(shown by the pipes)
Thanks,
Ted