samedi 25 avril 2015

Linux CLI change price (awk or sed?)


I have price strings formatted as $25.00 in various html files. I would like to use the Linux command line (BASH, presumably with awk or sed) to increase each price by a certain dollar amount ($3 in this case).

In short, I need to find $nn.00 and replace it with $(n+3)n.00

Started to put it together but I don't know how to add 3 sed -r 's/([^$][0-9][0-9][.]00). ????' file.html

Thanks!


Aucun commentaire:

Enregistrer un commentaire