I have a YML, in which I need to append numeric with double quotes. I tried various regex but somehow it gets break somewhere or other. I need to avoid alphanum or alpha...
- name: HEALTH_ELASTIC_HOST
value: 40c07d4283d245.elastic.test.com
- name: HEALTH_ELASTIC_PORT
value: 9243
- name: HEALTH_ELASTIC_USERNAME
value: elastic
The basic cmd which I took, and modified
sed 's/[0-9]*[0-9]/"&"/g' values.yaml
Expected Result
- name: HEALTH_ELASTIC_HOST
value: 40c07d4283d245.elastic.test.com
- name: HEALTH_ELASTIC_PORT
value: "9243"
- name: HEALTH_ELASTIC_USERNAME
value: elastic
Any help is appreciated..link to any doc or cmd.