Comment

Comment by bspammer

Elegant, but not something you should ever use outside of ad-hoc situations.

I think this is more comprehensible, and is also more robust because it actually specifies the field you're looking for rather than just any line with quotes:

gawk -F'"' '/^ name:/ {print $2}' appVersion.gradle

(hacker news is clobbering the spaces after ^)

parent bspammer 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton