1.

Solve : I want to add a parameter entered by user at the end of a particular line start?

Answer» HI Folks

I want to add a PARAMETER entered by user at the end of a particular LINE starting with "param_code" string and there are three lines in the text file starting with the string "param _code" using batch programming...like for example
there is a file sum.txt which contains below text:

;Logid=INFRASECDEV

param_code=DISCOUNT_SALES_CHANNEL, SALES_CHANNEL,
MAX_DEP_AMOUNT_SUBAG=0,150,300,500

[PROFILE_SEC_PARAMS]
;Example:
;param_code=code_1,code_2,...
;code_1=value_1_1,value_1_2,...

;...
param_code=ACCESS_NTWRK_INTERFACE_SCRNS, ACDN_ACCESS
ACCESS_NTWRK_INTERFACE_SCRNS=Y,N

and suppose user wants to add "abcd".so "abcd" gets added like this

;Logid=INFRASECDEV

param_code=DISCOUNT_SALES_CHANNEL, SALES_CHANNEL,
MAX_DEP_AMOUNT_SUBAG=0,150,300,500

[PROFILE_SEC_PARAMS]
;Example:
;param_code=code_1,code_2,...
;code_1=value_1_1,value_1_2,...

;...
param_code=ACCESS_NTWRK_INTERFACE_SCRNS, ACDN_ACCESS,abcd
ACCESS_NTWRK_INTERFACE_SCRNS=Y,N


Please guys help me out in this batch CODE creation as I am new to batch programming.
Hoping for help from batch programming experts.


How are we suppose to know which param_code to edit?I need to add the user input in the last param_code line
param_code=ACCESS_NTWRK_INTERFACE_SCRNS, ACDN_ACCESS

one thing can be done I suppose
if we search param_code string with "param_code=ACCESS_NTWRK_INTERFACE_SCRNS"Can ANYONE


Discussion

No Comment Found