Arithmetic calculation in shell scripting-bash
问题 I have an input notepad file as shown below: sample input file: vegetables and rates kg rate total Tomato 4 50 100 potato 2 60 120 Beans 3 80 240 Overalltotal: (100+120++240) = 460 I need to multiply the column 2 and column 3 and check the total if it is right and the overall total as well. If that's not right we need to print in the same file as an error message as shown below enter code here sample output file: vegetables and rates kg rate vegtotal Tomato 4 50 200 potato 2 60 120 Beans 3 80