Been banging my head off a wall on this
bash variable LATLNG contains a latitude & longitude value in brackets like so
I want to parse these into a variable called LAT and LON which I'm trying to do via sed like so
LAT=$(sed "s/(\(.*\),\(.*\))/\1/g" "$LATLNG")
LON=$(sed "s/(\(.*\),\(.*\))/\2/g" "$LATLNG")
However, I get the following error:
sed: can't read (53.3096,-6.28396): No such file or directory
I'm obviously doing something silly here but it's very late and I cant see what it is. I've tried several other variations without luck too.