Hi,
I have three different files about a warehouse's stock status.
Each file shows storage locations, stored product names, quantity of the part and at last column, its price.
When there is a change in price, I open those files one by one, search related product name at each row and change the price manually.
What I would like to have is a a script to make the task easier: It will ask me to enter which product name I am looking for. When I enter the product name in terminal panel, it will ask me the second question, the new price. When I enter new price in same format, it will replace the old one by the new one in all three files.
Here are my sample files:
database1.txt
store1 product101 440 �40
store2 product102 300 �22
store2 product103 210 �39
store2 product104 120 �40
store1 product105 100 �29
store1 product106 5 �34
store3 product107 90 �19
store3 product108 209 �20
store4 product109 109 �10
store4 product110 103 �12
store5 product111 298 �90
database2.txt
store4 product101 40 �40
store3 product102 9 �22
store2 product103 91 �39
store2 product104 12 �40
store1 product105 10 �29
store2 product106 5 �34
store9 product107 90 �19
store3 product108 29 �20
store4 product109 19 �10
store8 product110 13 �12
store5 product111 28 �90
database3.txt
store1 product101 440 �40
store2 product102 20 �22
store2 product103 30 �39
store6 product104 6 �40
store6 product105 9 �29
store3 product106 5 �34
store7 product107 90 �19
store9 product108 209 �20
store8 product109 109 �10
store4 product110 103 �12
store1 product111 298 �90
I am not sure if this question should be placed under "shell script" topic.
I would appreciate if you could help me.
thanks in advance
Boris