I've created a script which writes .flame/XML-like files, containing within them, a string which looks like:
where n is a random number, with a variable number of digits. What I am attempting to do is replace this string with another random number within a particular range; generating this number is trivial, as I already have shuf working for this purpose. The trouble arises when attempting to find and replace this string, as it could be similar to any of the following:
scale="54.1948", scale="182.55816", or scale="3.59"
I've tried using sed for this, and while I'm confident it's possible, I have not found the correct syntax. The occurrence of this string is not consistent between files.
Ideally, the command I am looking for would convert a string which looks like this:
scale="54.1948" or scale="3.59"
to one which looks like:
scale"254" or scale="579"
Thanks for any help.