I trying to grep
a line which have double quotes. How can I do it without including double quotes.
export port="$(find ./pdf/myInventory/dyn_conf/group_vars/abc1/vars.yml -exec sh -c 'grep -A 3 -e ilink_nei_sri_host {} | grep -e port' \; | cut -d: -f2)"
export port_https=$(($abc_port + 81))
find ./pdf/myInventory/dyn_conf/group_vars/abc1/vars.yml \
-exec sed -i -e 's/port: \"${port}\"/port: \"${port_https}\"/g' {} \;
However, if the port has double quotes eg for port value: "20080"
Im trying to replace with the port_https value and it become " "20080""
How can i make it just just to "20080"
?