2 ms·
Do not do this in awk when the same in sed would be easier to read. But also do not match this data format in the first quote. Match "name:" instead if that is
by xorcist 4y ago
Do not do this in awk when the same in sed would be easier to read.
But also do not match this data format in the first quote. Match "name:" instead if that is what you mean. This makes the intention clear.
For matching text, just use grep is that is what most people would expect:
grep -m 1 "name:" appVersion.gradle | grep -o "[0-9.]"
You can shorten it to one regexp if you use an extended format that can handle backrefs if the context would make that clearer.