79112594

Date: 2024-10-22 05:54:15
Score: 1.5
Natty:
Report link

I had trouble using chepner's answer while using variables. Instead I ended up using the following:

$ version="15.12"
$ major="${version%%.*}"
$ echo "$major"
15
Reasons:
  • Low length (1):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Johnny 5