Admittedly, I am very simple in my suggestion. In my experience, examples of regular expressions for a field separator are the most valuable to learn, especially if you have to deal with XML, etc. But in this case, we must remember that UNIX gives you many alternatives when faced with characters that do not matter. A simple fix is ββto simply remove unnecessary characters. There are various ways, but I would use tr -d '{}' as follows:
tr -d '{}' file.txt | awk '{ for( i=2; i<=NF; i++ ) print $i }'
Starting the loop counter i in 2 is just a quick way to skip the first argument ( -foo )
David hull
source share