0

I need to enter some command value into a variable, I’ve tried with the following which doesn't work, what could be missing here?

OUTPUT=git describe --tags --abbrev=0 | awk -F. '{$NF+=1; OFS="."; print $0}'
echo "${OUTPUT}"

For this I got

OUTPUT="git describe --tags --abbrev=0 | awk -F. '{F+=1; OFS="."; print }'"
echo ""

even if I remove the quote it doesn't work...

Barmar
  • 741,623
  • 53
  • 500
  • 612
  • @that other guy - why, i’ve read it already and try exactly like the first answer and it doesnt works…\ –  Apr 04 '18 at 18:17
  • The first answer being the accepted one? It does work. Please update your question and show what's wrong when you apply it (with actual and expected result) – that other guy Apr 04 '18 at 18:23

0 Answers0