Hi,
consider a file called mobile.txt as follows:
For type lovers, add a new line at the end of it by copying its previous line and add a +1 to the field1, field2
Additionally, there are only 3 plans available to lovers type, so it should not work for lovers type already having 3 lines under it (no need bother about what PLAN). Here it should copy "004,PLAN4,60Days" from lovers type with Loc=South and add +1 to field1 and field2; place that line to next of it.
Output: (highlighted will be the line added to this file).
Kindly help me out with this script.