I have a text file which looks like this:
... unique_trigger = item1 item2 item3 ... itemN unique_end_trigger ... Is there a quick (maybe on-liner if possible) bash script I could use to parse the file and pipe item1 item2 item3... into another command? The number of items is not determined. I looked at other bash scripts to read variables out of a file but they either source it, parse each item manually (predetermined list length) or assign a environment variable to each item based on its name (which is not my case). I am looking for something like this:
parse_command file.txt | other_command
itemcontain white space or embedded linefeeds? what do the lines before/after theunique_triggersection look like; do allitementries have a leading=or just the first one? are there any lines in theunique_triggersection that should not be printed?jq?