|
Thank You, works perfectly....
Sincere apologies for asking another question but I am very new to scripting and need some HELP.
Question:
How to reverse it.. means find the line with host=atlx3 sid=atld3 and mail=DISABLE and then delete this line and at the same time un-comment ('#') the line above it..
--- INPUT.TXT ------
host=atlx1 sid=atld1 mail=abc@abc.com
host=atlx2 sid=atld2 mail=xyz@abc.com
#host=atlx3 sid=atld3 mail=def@abc.com
host=atlx3 sid=atld3 mail=DISABLE
host=atlx4 sid=atld4 mail=mno@abc.com
-------------------------
---- OUTPUT.txt -----
host=atlx1 sid=atld1 mail=abc@abc.com
host=atlx2 sid=atld2 mail=xyz@abc.com
host=atlx3 sid=atld3 mail=def@abc.com
host=atlx4 sid=atld4 mail=mno@abc.com
--------------------
|