I was hoping to
curl data into a shell script variable, then use
awk to operate on that variable as if it was a file.
Is this possible, or is there a workaround? Do I have to save the
curl command into a file?
Do I have to run
curl several times, for each bit of string formatting I want to do?
curling ipinfo.io, and want to output the matching lines for "city" and "region". I know how to use
sed to format the output as desired.
Try for example,
curl ipinfo.io/"184.108.40.206" for the result for a Google DNS IP address.
I'd like to print just "Mountain View" and "California," preferably on the same line, with some common formatting, like "Mountain View, California".